projlib.dox 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 originally developed by Gerald
  9. Evenden/USGS (Cartographic Projection Procedures for the UNIX
  10. Environment -- A User's Manual, Evenden, 1990, Open-file report
  11. 90-284). The PROJ4 (<a
  12. href="http://proj.maptools.org">http://proj.maptools.org</a>)
  13. functions are used through wrapper functions 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 either
  18. read from PROJ_INFO and PROJ_UNITS files (g.proj, v.proj, r.proj) or read from
  19. user prompts (g.proj and g.setproj).
  20. In GRASS the wrapper functions in lib/proj/get_proj.c makes the
  21. preparations to set up the parameter strings and init the info-structures,
  22. while do_proj.c contains the actual projection calls.
  23. ellipse.c and datum.c contain functions for querying GRASS locations
  24. and users for ellipsoid and datum information (some of these functions
  25. were included in the GIS library in earlier versions of GRASS).
  26. convert.c contains functions for converting GRASS co-ordinate system
  27. descriptions to and from the formats used by other GIS. Heavy use is
  28. made of the OGR library, part of GDAL (http://www.gdal.org/ogr/).
  29. \subsection datum_transformation Datum transformation
  30. GRASS generally supports datum transformation (3 parameters, 7 parameters
  31. and grid).
  32. <P>
  33. If a warning appears that a certain datum is not recognised by GRASS and
  34. no parameters found, the datum transformation parameters have to be
  35. added to $GISBASE/etc/datum.table (and also $GISBASE/etc/datumtransform.table
  36. if you have 7-parameter transformation parameters). No need to re-compile
  37. though. When adding to SVN, currently these files are still in lib/gis/.
  38. \subsection Makefile_Example Makefile Example
  39. <P>
  40. The following code demonstrates the Makefile.
  41. \verbatim
  42. MODULE_TOPDIR = ../..
  43. PGM = r.myproj
  44. EXTRA_INC = $(PROJINC)
  45. LIBES = $(GPROJLIB) $(GISLIB)
  46. DEPENDENCIES= $(GPROJDEP) $(GISDEP)
  47. include $(MODULE_TOPDIR)/include/Make/Module.make
  48. default: cmd
  49. \endverbatim
  50. */