浏览代码

r.out.arc: use full fp precision for LL

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@51615 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 13 年之前
父节点
当前提交
cac5d71c46
共有 1 个文件被更改,包括 7 次插入3 次删除
  1. 7 3
      raster/r.out.arc/main.c

+ 7 - 3
raster/r.out.arc/main.c

@@ -152,11 +152,15 @@ int main(int argc, char *argv[])
 	    }
 	}
 	else {			/* yes, lat/long */
-	    fprintf(fp, "xllcorner %f\n", region.west);
-	    fprintf(fp, "yllcorner %f\n", region.south);
+	    G_format_easting(region.west, buf, -1);
+	    fprintf(fp, "xllcorner %s\n", buf);
+
+	    G_format_northing(region.south, buf, -1);
+	    fprintf(fp, "yllcorner %s\n", buf);
 	}
 
-	fprintf(fp, "cellsize %f\n", cellsize);
+	G_format_resolution(cellsize, buf, -1);
+	fprintf(fp, "cellsize %s\n", buf);
 	fprintf(fp, "NODATA_value %s\n", null_str);
     }