print_trans.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. ****************************************************************************
  3. *
  4. * MODULE: v.transform
  5. * AUTHOR(S): See other files as well...
  6. * Eric G. Miller <egm2@jps.net>
  7. * PURPOSE: To transform a vector layer's coordinates via a set of tie
  8. * points.
  9. * COPYRIGHT: (C) 2002 by the GRASS Development Team
  10. *
  11. * This program is free software under the GNU General Public
  12. * License (>=v2). Read the file COPYING that comes with GRASS
  13. * for details.
  14. *
  15. *****************************************************************************/
  16. #include <stdio.h>
  17. #include <grass/gis.h>
  18. #include "trans.h"
  19. #include <grass/glocale.h>
  20. int print_transform_resids(int n_points)
  21. {
  22. int i;
  23. fprintf(stdout, "\n");
  24. fprintf(stdout, " CHECK MAP RESIDUALS\n");
  25. fprintf(stdout, " Current Map New Map\n");
  26. fprintf(stdout,
  27. " POINT X coord Y coord | X coord Y coord | residuals\n");
  28. fprintf(stdout, "\n");
  29. for (i = 0; i < n_points; i++) {
  30. if (use[i])
  31. fprintf(stdout,
  32. " %2d. %12.2f %12.2f | %12.2f %12.2f | %12.2f\n",
  33. i + 1, ax[i], ay[i], bx[i], by[i], residuals[i]);
  34. }
  35. fprintf(stdout, "\n\n Number of points: %d\n", n_points);
  36. fprintf(stdout, " Residual mean average: %f\n", rms);
  37. fprintf(stdout, "\n");
  38. return (0);
  39. } /* print_transform_resid() */