trans.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * Written by the GRASS Team, 02/16/90, -mh .
  3. */
  4. /******************
  5. * INCLUDES: *
  6. *******************/
  7. #include <stdio.h>
  8. /******************
  9. * DEFINES: *
  10. *******************/
  11. #define MIN_COOR 4
  12. #define MAX_COOR 1000
  13. /* return status for setup_transform() and the transform library */
  14. #define ALL_OK 1
  15. #define POINTS_NOT_SPREAD -1
  16. #define NEED_MORE_POINTS -2
  17. #define TRANS_MATRIX 0
  18. #define TRANS_SHIFT 1
  19. #define IDX_XSHIFT 0
  20. #define IDX_YSHIFT 1
  21. #define IDX_ZSHIFT 2
  22. #define IDX_XSCALE 3
  23. #define IDX_YSCALE 4
  24. #define IDX_ZSCALE 5
  25. #define IDX_ZROT 6
  26. /******************
  27. * GLOBALS: *
  28. *******************/
  29. /**
  30. * The coordinates of the points from the map that is to be converted
  31. * are placed in ax[] and ay[].
  32. * Those cooresponding points in the other coordinate system
  33. * are placed in bx[], by[].
  34. *
  35. * The use[] contains a true if that point is to be used by the transform
  36. * library or a false (0) if it is not to be used.
  37. * The residuals each set of points contributes is placed in residuals[].
  38. *
  39. * Yah, I made them global. So shoot me.
  40. **/
  41. extern double ax[MAX_COOR]; /* current map */
  42. extern double ay[MAX_COOR];
  43. extern double bx[MAX_COOR]; /* map we are going to */
  44. extern double by[MAX_COOR];
  45. extern int use[MAX_COOR]; /* where the coordinate came from */
  46. extern double residuals[MAX_COOR];
  47. extern double rms;
  48. /* this may be used in the future */
  49. extern int reg_cnt; /* count of registered points */
  50. /******************
  51. * STRUCTS: *
  52. *******************/
  53. /* For GRASS data files */
  54. struct file_info
  55. {
  56. FILE *fp;
  57. char *mapset;
  58. char name[80];
  59. char full_name[256];
  60. };
  61. /* general flags that get set from the command line */
  62. struct command_flags
  63. {
  64. int verbose; /* do we print residual info */
  65. int usage;
  66. };
  67. #include <grass/libtrans.h>