Przeglądaj źródła

export nsew with full precision (merge from devbr6)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42580 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 15 lat temu
rodzic
commit
9a7d3e1f1a
1 zmienionych plików z 4 dodań i 8 usunięć
  1. 4 8
      raster/r.info/main.c

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

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