[GRASS-SVN] r45877 - grass/trunk/scripts/v.in.mapgen
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Apr 8 23:48:14 EDT 2011
Author: hamish
Date: 2011-04-08 20:48:14 -0700 (Fri, 08 Apr 2011)
New Revision: 45877
Modified:
grass/trunk/scripts/v.in.mapgen/v.in.mapgen.py
Log:
use %.15g instead of %.8f (#335)
Modified: grass/trunk/scripts/v.in.mapgen/v.in.mapgen.py
===================================================================
--- grass/trunk/scripts/v.in.mapgen/v.in.mapgen.py 2011-04-09 03:28:08 UTC (rev 45876)
+++ grass/trunk/scripts/v.in.mapgen/v.in.mapgen.py 2011-04-09 03:48:14 UTC (rev 45877)
@@ -116,7 +116,7 @@
if points != []:
outf.write("L %d\n" % len(points))
for point in points:
- outf.write(" %.8f %.8f %.8f\n" % tuple(map(float,point)))
+ outf.write(" %.15g %.15g %.15g\n" % tuple(map(float,point)))
points = []
else:
if len(f) == 2:
@@ -127,7 +127,7 @@
outf.write("L %d\n" % len(points))
for point in points:
try:
- outf.write(" %.8f %.8f %.8f\n" % tuple(map(float, point)))
+ outf.write(" %.15g %.15g %.15g\n" % tuple(map(float, point)))
except ValueError:
grass.fatal(_("An error occured on line '%s', exiting.") % line.strip())
else:
@@ -138,7 +138,7 @@
if points != []:
outf.write("L %d\n" % len(points))
for point in points:
- outf.write(" %.8f %.8f\n" % tuple(map(float,point)))
+ outf.write(" %.15g %.15g\n" % tuple(map(float,point)))
points = []
else:
points.append(line.rstrip('\r\n').split('\t'))
@@ -146,7 +146,7 @@
if points != []:
outf.write("L %d\n" % len(points))
for point in points:
- outf.write(" %.8f %.8f\n" % tuple(map(float,point)))
+ outf.write(" %.15g %.15g\n" % tuple(map(float,point)))
outf.close()
inf.close()
More information about the grass-commit
mailing list