[GRASS-SVN] r34119 - in grass/branches/develbranch_6: raster/r.info raster3d/base

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 30 19:49:51 EDT 2008


Author: neteler
Date: 2008-10-30 19:49:51 -0400 (Thu, 30 Oct 2008)
New Revision: 34119

Modified:
   grass/branches/develbranch_6/raster/r.info/main.c
   grass/branches/develbranch_6/raster3d/base/r3.info.main.c
Log:
glynn: Use decimal degrees for -g (merge from trunk, r34118)

Modified: grass/branches/develbranch_6/raster/r.info/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.info/main.c	2008-10-30 22:28:26 UTC (rev 34118)
+++ grass/branches/develbranch_6/raster/r.info/main.c	2008-10-30 23:49:51 UTC (rev 34119)
@@ -336,13 +336,17 @@
 	}
 
 	if (gflag->answer) {
-	    G_format_northing(cellhd.north, tmp1, cellhd.proj);
-	    G_format_northing(cellhd.south, tmp2, cellhd.proj);
+	    sprintf(tmp1, "%f", cellhd.north);
+	    sprintf(tmp2, "%f", cellhd.south);
+	    G_trim_decimal(tmp1);
+	    G_trim_decimal(tmp2);
 	    fprintf(out, "north=%s\n", tmp1);
 	    fprintf(out, "south=%s\n", tmp2);
 
-	    G_format_easting(cellhd.east, tmp1, cellhd.proj);
-	    G_format_easting(cellhd.west, tmp2, cellhd.proj);
+	    sprintf(tmp1, "%f", cellhd.east);
+	    sprintf(tmp2, "%f", cellhd.west);
+	    G_trim_decimal(tmp1);
+	    G_trim_decimal(tmp2);
 	    fprintf(out, "east=%s\n", tmp1);
 	    fprintf(out, "west=%s\n", tmp2);
 	}

Modified: grass/branches/develbranch_6/raster3d/base/r3.info.main.c
===================================================================
--- grass/branches/develbranch_6/raster3d/base/r3.info.main.c	2008-10-30 22:28:26 UTC (rev 34118)
+++ grass/branches/develbranch_6/raster3d/base/r3.info.main.c	2008-10-30 23:49:51 UTC (rev 34119)
@@ -354,13 +354,17 @@
 
 	}			/*Region */
 	else if (gflag->answer) {
-	    G_format_northing(cellhd.north, tmp1, cellhd.proj);
-	    G_format_northing(cellhd.south, tmp2, cellhd.proj);
+	    sprintf(tmp1, "%f", cellhd.north);
+	    sprintf(tmp2, "%f", cellhd.south);
+	    G_trim_decimal(tmp1);
+	    G_trim_decimal(tmp2);
 	    fprintf(out, "north=%s\n", tmp1);
 	    fprintf(out, "south=%s\n", tmp2);
 
-	    G_format_easting(cellhd.east, tmp1, cellhd.proj);
-	    G_format_easting(cellhd.west, tmp2, cellhd.proj);
+	    sprintf(tmp1, "%f", cellhd.east);
+	    sprintf(tmp2, "%f", cellhd.west);
+	    G_trim_decimal(tmp1);
+	    G_trim_decimal(tmp2);
 	    fprintf(out, "east=%s\n", tmp1);
 	    fprintf(out, "west=%s\n", tmp2);
 



More information about the grass-commit mailing list