[GRASS-SVN] r65682 - grass/trunk/gui/wxpython/tplot
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jul 20 03:01:56 PDT 2015
Author: lucadelu
Date: 2015-07-20 03:01:56 -0700 (Mon, 20 Jul 2015)
New Revision: 65682
Modified:
grass/trunk/gui/wxpython/tplot/frame.py
Log:
g.gui.tplot: fixed problem with null value in CELL maps
Modified: grass/trunk/gui/wxpython/tplot/frame.py
===================================================================
--- grass/trunk/gui/wxpython/tplot/frame.py 2015-07-20 09:10:05 UTC (rev 65681)
+++ grass/trunk/gui/wxpython/tplot/frame.py 2015-07-20 10:01:56 UTC (rev 65682)
@@ -288,6 +288,7 @@
sp = tgis.dataset_factory(etype, fullname)
sp.select(dbif=self.dbif)
+ minmin = sp.metadata.get_min_min()
self.plotNameListR.append(series)
self.timeDataR[name] = OrderedDict()
if not sp.is_in_db(dbif=self.dbif):
@@ -331,7 +332,11 @@
r.open()
val = r.get_value(self.poi)
r.close()
- self.timeDataR[name][row[0]]['value'] = val
+ if val == -2147483648 and val < minmin:
+ self.timeDataR[name][row[0]]['value'] = None
+ else:
+ self.timeDataR[name][row[0]]['value'] = val
+
self.unit = unit
self.temporalType = mode
return
@@ -583,11 +588,11 @@
try:
coordx, coordy = self.coorval.coordsField.GetValue().split(',')
coordx, coordy = float(coordx), float(coordy)
- except ValueError:
+ except (ValueError, AttributeError):
try:
coordx, coordy = self.coorval.GetValue().split(',')
coordx, coordy = float(coordx), float(coordy)
- except ValueError:
+ except (ValueError, AttributeError):
GMessage(_("Incorrect format of coordinates, should be: x,y"))
coors = [coordx, coordy]
More information about the grass-commit
mailing list