proj1.c 958 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*!
  2. \file lib/gis/proj1.c
  3. \brief GIS Library - Projection support (window related)
  4. (C) 2001-2011 by the GRASS Development Team
  5. This program is free software under the GNU General Public License
  6. (>=v2). Read the file COPYING that comes with GRASS for details.
  7. \author Original author CERL
  8. */
  9. #include <grass/gis.h>
  10. /*!
  11. \brief Query cartographic projection
  12. This routine returns a code indicating the projection for the active
  13. region. The current values are (see gis.h)
  14. - PROJECTION_XY 0 - x,y (Raw imagery)
  15. - PROJECTION_UTM 1 - UTM Universal Transverse Mercator
  16. - PROJECTION_SP 2 - State Plane (in feet) - not used, removed
  17. - PROJECTION_LL 3 - Latitude-Longitude
  18. - PROJECTION_OTHER 99 - others
  19. Others may be added in the future.
  20. \return projection code (see above)
  21. */
  22. int G_projection(void)
  23. {
  24. struct Cell_head window;
  25. G_get_set_window(&window);
  26. return window.proj;
  27. }