zone.c 668 B

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * \file zone.c
  3. *
  4. * \brief Cartographic zone functions.
  5. *
  6. * This program is free software under the GNU General Public License
  7. * (>=v2). Read the file COPYING that comes with GRASS for details.
  8. *
  9. * \author GRASS GIS Development Team
  10. *
  11. * \date 1999-2006
  12. */
  13. #include <grass/gis.h>
  14. /**
  15. * \brief Query cartographic zone.
  16. *
  17. * This routine returns the zone for the active region. The meaning for
  18. * the zone depends on the projection. For example, zone 18 for
  19. * projection type 1 would be UTM zone 18.
  20. *
  21. * \return int cartographic zone
  22. */
  23. int G_zone(void)
  24. {
  25. struct Cell_head window;
  26. G_get_set_window(&window);
  27. return window.zone;
  28. }