proj1.c 862 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*!
  2. \file gis/proj1.c
  3. *
  4. * \brief GIS Library - Projection support
  5. *
  6. * (C) 2001-2009 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 region. The current
  17. 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. }