Prechádzať zdrojové kódy

Use decimal degrees for -g

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@34118 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 16 rokov pred
rodič
commit
304b9ed488
2 zmenil súbory, kde vykonal 16 pridanie a 8 odobranie
  1. 8 4
      raster/r.info/main.c
  2. 8 4
      raster3d/base/r3.info.main.c

+ 8 - 4
raster/r.info/main.c

@@ -336,13 +336,17 @@ int main(int argc, char **argv)
 	}
 
 	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);
 	}

+ 8 - 4
raster3d/base/r3.info.main.c

@@ -354,13 +354,17 @@ int main(int argc, char *argv[])
 
 	}			/*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);