gprojects.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. ******************************************************************************
  3. *
  4. * MODULE: gproj library
  5. * AUTHOR(S): Original Author unknown, probably Soil Conservation Service
  6. * Paul Kelly
  7. * PURPOSE: Include file for GRASS modules that use the PROJ.4
  8. * wrapper functions
  9. * COPYRIGHT: (C) 2003 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. #ifndef GRASS_GPROJECTS_H
  17. #define GRASS_GPROJECTS_H
  18. #include <grass/config.h>
  19. #include <proj_api.h>
  20. #ifdef HAVE_OGR
  21. # include <ogr_srs_api.h>
  22. #endif
  23. /* Data Files */
  24. #define ELLIPSOIDTABLE "/etc/proj/ellipse.table"
  25. #define DATUMTABLE "/etc/proj/datum.table"
  26. #define DATUMTRANSFORMTABLE "/etc/proj/datumtransform.table"
  27. /* GRASS relative location of datum conversion lookup tables */
  28. #define GRIDDIR "/etc/proj/nad"
  29. struct pj_info
  30. {
  31. projPJ pj;
  32. double meters;
  33. int zone;
  34. char proj[100];
  35. };
  36. struct gpj_datum
  37. {
  38. char *name, *longname, *ellps;
  39. double dx, dy, dz;
  40. };
  41. struct gpj_datum_transform_list
  42. {
  43. int count; /**< Transform Number (ordered list) */
  44. char *params; /**< PROJ.4-style datum transform parameters */
  45. char *where_used; /**< Comment text describing where (geographically)
  46. * the transform is valid */
  47. char *comment; /**< Additional Comments */
  48. struct gpj_datum_transform_list *next; /**< Pointer to next set of
  49. * transform parameters in linked list */
  50. };
  51. struct gpj_ellps
  52. {
  53. char *name, *longname;
  54. double a, es, rf;
  55. };
  56. /* PROJ.4's private datastructures copied from projects.h as removed
  57. from upstream; pending better solution. see:
  58. http://trac.osgeo.org/proj/ticket/98 */
  59. typedef struct { double u, v; } LP;
  60. struct DERIVS {
  61. double x_l, x_p; /* derivatives of x for lambda-phi */
  62. double y_l, y_p; /* derivatives of y for lambda-phi */
  63. };
  64. struct FACTORS {
  65. struct DERIVS der;
  66. double h, k; /* meridinal, parallel scales */
  67. double omega, thetap; /* angular distortion, theta prime */
  68. double conv; /* convergence */
  69. double s; /* areal scale factor */
  70. double a, b; /* max-min scale error */
  71. int code; /* info as to analytics, see following */
  72. };
  73. /* end of copy */
  74. #include <grass/defs/gprojects.h>
  75. #endif