[GRASS-SVN] r65508 - grass/trunk/gui/wxpython/wxplot
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jun 21 19:43:49 PDT 2015
Author: annakrat
Date: 2015-06-21 19:43:49 -0700 (Sun, 21 Jun 2015)
New Revision: 65508
Modified:
grass/trunk/gui/wxpython/wxplot/profile.py
Log:
wxGUI/plot: fix truncating values when exporting to csv
Modified: grass/trunk/gui/wxpython/wxplot/profile.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/profile.py 2015-06-21 18:50:14 UTC (rev 65507)
+++ grass/trunk/gui/wxpython/wxplot/profile.py 2015-06-22 02:43:49 UTC (rev 65508)
@@ -153,9 +153,9 @@
insideRegion = False
# build string of coordinate points for r.profile
if self.coordstr == '':
- self.coordstr = '%d,%d' % (point[0], point[1])
+ self.coordstr = '%f,%f' % (point[0], point[1])
else:
- self.coordstr = '%s,%d,%d' % (self.coordstr, point[0], point[1])
+ self.coordstr = '%s,%f,%f' % (self.coordstr, point[0], point[1])
if not insideRegion:
GWarning(message = _("Not all points of profile lie inside computational region."),
@@ -176,7 +176,7 @@
parent = self,
read = True,
map = self.rasterList[0],
- coordinates = '%d,%d' % (point[0],point[1]))
+ coordinates = '%f,%f' % (point[0], point[1]))
val = ret.splitlines()[0].split('|')[3]
if val == None or val == '*':
@@ -368,7 +368,7 @@
return
for datapair in self.raster[r]['datalist']:
- fd.write('%d,%d\n' % (float(datapair[0]),float(datapair[1])))
+ fd.write('%.6f,%.6f\n' % (float(datapair[0]),float(datapair[1])))
fd.close()
More information about the grass-commit
mailing list