projlib.dox 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*! \page projlib GRASS and the PROJ4 projection library
  2. <!-- doxygenized from "GRASS 5 Programmer's Manual"
  3. by M. Neteler 11/2005
  4. -->
  5. by GRASS Development Team
  6. http://grass.osgeo.org
  7. \section projintro GRASS and the PROJ4 projection library
  8. GRASS utilizes the PROJ4 library (<a
  9. href="http://proj.osgeo.org">http://proj.osgeo.org</a>) originally
  10. developed by Gerald Evenden/USGS (Cartographic Projection Procedures
  11. for the UNIX Environment -- A User's Manual, Evenden, 1990, Open-file
  12. report 90-284). The PROJ4 functions are used through wrapper functions
  13. in a GRASS environment.
  14. Internally to the PROJ.4 library, projection may involve transformation to
  15. and from geodetic co-ordinates (latitude and longitude), and numerical
  16. corrections to account for different datums.
  17. This is transparent for the user as input and output parameters are
  18. either read from PROJ_INFO and PROJ_UNITS files (<tt>g.proj</tt>,
  19. <tt>v.proj</tt>, <tt>r.proj</tt>) or read from user prompts (<tt>g.proj</tt>
  20. and <tt>g.setproj</tt>).
  21. In GRASS the wrapper functions in lib/proj/get_proj.c makes the
  22. preparations to set up the parameter strings and init the info-structures,
  23. while lib/proj/do_proj.c contains the actual projection calls.
  24. Files lib/proj/ellipse.c and lib/proj/datum.c contain functions for
  25. querying GRASS locations and users for ellipsoid and datum information
  26. (some of these functions were included in the GIS library in earlier
  27. versions of GRASS).
  28. File lib/proj/convert.c contains functions for converting GRASS
  29. co-ordinate system descriptions to and from the formats used by other
  30. GIS. Heavy use is made of the OGR library, part of GDAL
  31. (http://www.gdal.osgeo.org/ogr/).
  32. \subsection datum_transformation Datum transformation
  33. GRASS generally supports datum transformation (3 parameters, 7 parameters
  34. and grid).
  35. <P>
  36. If a warning appears that a certain datum is not recognised by GRASS and
  37. no parameters found, the datum transformation parameters have to be
  38. added to $GISBASE/etc/proj/datum.table (and also $GISBASE/etc/proj/datumtransform.table
  39. if you have 7-parameter transformation parameters). No need to re-compile
  40. though. When adding to SVN, currently these files are still in lib/gis/.
  41. \subsection Makefile_Example Makefile Example
  42. <P>
  43. The following code demonstrates the Makefile.
  44. \verbatim
  45. MODULE_TOPDIR = ../..
  46. PGM = r.myproj
  47. EXTRA_INC = $(PROJINC)
  48. LIBES = $(GPROJLIB) $(GISLIB)
  49. DEPENDENCIES= $(GPROJDEP) $(GISDEP)
  50. include $(MODULE_TOPDIR)/include/Make/Module.make
  51. default: cmd
  52. \endverbatim
  53. \section Functions
  54. - GPJ_ask_datum_params()
  55. - GPJ_get_datum_by_name()
  56. - GPJ__get_datum_params()
  57. - GPJ_get_datum_params()
  58. - GPJ_get_default_datum_params_by_name()
  59. - GPJ_get_ellipsoid_by_name()
  60. - GPJ_get_ellipsoid_params()
  61. - GPJ_get_equivalent_latlong()
  62. - GPJ_grass_to_osr()
  63. - GPJ_grass_to_wkt()
  64. - GPJ_free_datum()
  65. - GPJ_free_ellps()
  66. - GPJ_set_csv_loc()
  67. - GPJ_osr_to_grass()
  68. - GPJ_wkt_to_grass()
  69. */