[GRASS-SVN] r43564 -
grass/branches/releasebranch_6_4/raster/r.distance
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 21 06:44:10 EDT 2010
Author: neteler
Date: 2010-09-21 10:44:09 +0000 (Tue, 21 Sep 2010)
New Revision: 43564
Modified:
grass/branches/releasebranch_6_4/raster/r.distance/report.c
Log:
backport: output correct precision for different projection types (bugs #654 and #335)
Modified: grass/branches/releasebranch_6_4/raster/r.distance/report.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.distance/report.c 2010-09-21 10:39:25 UTC (rev 43563)
+++ grass/branches/releasebranch_6_4/raster/r.distance/report.c 2010-09-21 10:44:09 UTC (rev 43564)
@@ -59,13 +59,17 @@
fprintf(stdout, "%s%s", fs, temp);
/* print coordinates of the closest pair */
- G_format_easting(east1, temp, -1);
+ G_format_easting(east1, temp,
+ G_projection() == PROJECTION_LL ? -1 : 0);
fprintf(stdout, "%s%s", fs, temp);
- G_format_northing(north1, temp, -1);
+ G_format_northing(north1, temp,
+ G_projection() == PROJECTION_LL ? -1 : 0);
fprintf(stdout, "%s%s", fs, temp);
- G_format_easting(east2, temp, -1);
+ G_format_easting(east2, temp,
+ G_projection() == PROJECTION_LL ? -1 : 0);
fprintf(stdout, "%s%s", fs, temp);
- G_format_northing(north2, temp, -1);
+ G_format_northing(north2, temp,
+ G_projection() == PROJECTION_LL ? -1 : 0);
fprintf(stdout, "%s%s", fs, temp);
/* print category labels */
More information about the grass-commit
mailing list