proj1.c 879 B

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