get_en.c 917 B

123456789101112131415161718192021222324252627282930313233
  1. /****************************************************************************
  2. *
  3. * MODULE: r.digit
  4. *
  5. * AUTHOR(S): Michael Shapiro - CERL
  6. *
  7. * PURPOSE: Interactive tool used to draw and save vector features
  8. * on a graphics monitor using a pointing device (mouse)
  9. * and save to a raster map.
  10. *
  11. * COPYRIGHT: (C) 2006 by the GRASS Development Team
  12. *
  13. * This program is free software under the GNU General Public
  14. * License (>=v2). Read the file COPYING that comes with GRASS
  15. * for details.
  16. *
  17. ***************************************************************************/
  18. #include <grass/gis.h>
  19. int get_east_north(int x, int y, char *east, char *north)
  20. {
  21. double e, n;
  22. G_plot_where_en(x, y, &e, &n);
  23. G_format_easting(e, east, G_projection());
  24. G_format_northing(n, north, G_projection());
  25. return 0;
  26. }