proj1.c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /**********************************************************************
  2. * G_projection()
  3. *
  4. * Returns the projection type of the currently set window.
  5. * (Note this is really the coordinate system, not the projection)
  6. * PROJECTION_XY 0 - x,y (Raw imagery)
  7. * PROJECTION_UTM 1 - UTM Universal Transverse Mercator
  8. * PROJECTION_SP 2 - State Plane (in feet)
  9. * PROJECTION_LL 3 - Latitude-Longitude
  10. *
  11. **********************************************************************/
  12. #include <grass/gis.h>
  13. /*!
  14. * \brief query cartographic projection
  15. *
  16. * This routine returns a code indicating the projection for the active region. The current
  17. * values are:
  18. * 0 unreferenced x,y (imagery data)
  19. * 1 UTM
  20. * 2 State Plane
  21. * 3 Latitude-Longitude\remarks{Latitude-Longitude is not yet fully supported in
  22. * GRASS.}
  23. * Others may be added in the future. HINT GRASS 5: 121 projections!!
  24. *
  25. * \param void
  26. * \return int
  27. */
  28. int G_projection(void)
  29. {
  30. struct Cell_head window;
  31. G_get_set_window(&window);
  32. return window.proj;
  33. }