[GRASS-SVN] r43586 - grass/branches/releasebranch_6_4/raster/r.stats
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 21 09:16:24 EDT 2010
Author: neteler
Date: 2010-09-21 13:16:24 +0000 (Tue, 21 Sep 2010)
New Revision: 43586
Modified:
grass/branches/releasebranch_6_4/raster/r.stats/raw_stats.c
Log:
backport: output correct precision for different projection types (bugs #654 and #335)
Modified: grass/branches/releasebranch_6_4/raster/r.stats/raw_stats.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.stats/raw_stats.c 2010-09-21 13:12:07 UTC (rev 43585)
+++ grass/branches/releasebranch_6_4/raster/r.stats/raw_stats.c 2010-09-21 13:16:24 UTC (rev 43586)
@@ -44,7 +44,8 @@
}
if (with_coordinates)
- G_format_northing(G_row_to_northing(row + .5, &window), nbuf, -1);
+ G_format_northing(G_row_to_northing(row + .5, &window), nbuf,
+ G_projection() == PROJECTION_LL ? -1 : 0);
for (col = 0; col < ncols; col++) {
if (no_nulls || no_nulls_all) {
@@ -69,7 +70,7 @@
}
if (with_coordinates) {
G_format_easting(G_col_to_easting(col + .5, &window), ebuf,
- -1);
+ G_projection() == PROJECTION_LL ? -1 : 0);
fprintf(stdout, "%s%s%s%s", ebuf, fs, nbuf, fs);
}
if (with_xy)
More information about the grass-commit
mailing list