[GRASS-SVN] r65509 - grass/branches/releasebranch_7_0/gui/wxpython/wxplot
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jun 21 19:47:05 PDT 2015
Author: annakrat
Date: 2015-06-21 19:47:05 -0700 (Sun, 21 Jun 2015)
New Revision: 65509
Modified:
grass/branches/releasebranch_7_0/gui/wxpython/wxplot/profile.py
Log:
wxGUI/profile: fix truncating values when exporting to csv (merge from trunk, r65508)
Modified: grass/branches/releasebranch_7_0/gui/wxpython/wxplot/profile.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/wxplot/profile.py 2015-06-22 02:43:49 UTC (rev 65508)
+++ grass/branches/releasebranch_7_0/gui/wxpython/wxplot/profile.py 2015-06-22 02:47:05 UTC (rev 65509)
@@ -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