[GRASS-SVN] r42581 - grass/branches/releasebranch_6_4/raster/r.info

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 17 12:39:00 EDT 2010


Author: hamish
Date: 2010-06-17 16:39:00 +0000 (Thu, 17 Jun 2010)
New Revision: 42581

Modified:
   grass/branches/releasebranch_6_4/raster/r.info/main.c
Log:
export nsew with full precision (merge from devbr6)

Modified: grass/branches/releasebranch_6_4/raster/r.info/main.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.info/main.c	2010-06-17 16:37:22 UTC (rev 42580)
+++ grass/branches/releasebranch_6_4/raster/r.info/main.c	2010-06-17 16:39:00 UTC (rev 42581)
@@ -336,17 +336,13 @@
 	}
 
 	if (gflag->answer) {
-	    sprintf(tmp1, "%f", cellhd.north);
-	    sprintf(tmp2, "%f", cellhd.south);
-	    G_trim_decimal(tmp1);
-	    G_trim_decimal(tmp2);
+	    G_format_northing(cellhd.north, tmp1, -1);
+	    G_format_northing(cellhd.south, tmp2, -1);
 	    fprintf(out, "north=%s\n", tmp1);
 	    fprintf(out, "south=%s\n", tmp2);
 
-	    sprintf(tmp1, "%f", cellhd.east);
-	    sprintf(tmp2, "%f", cellhd.west);
-	    G_trim_decimal(tmp1);
-	    G_trim_decimal(tmp2);
+	    G_format_easting(cellhd.east, tmp1, -1);
+	    G_format_easting(cellhd.west, tmp2, -1);
 	    fprintf(out, "east=%s\n", tmp1);
 	    fprintf(out, "west=%s\n", tmp2);
 	}



More information about the grass-commit mailing list