[GRASS-SVN] r62938 - grass/trunk/scripts/v.rast.stats
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 25 06:31:41 PST 2014
Author: lucadelu
Date: 2014-11-25 06:31:41 -0800 (Tue, 25 Nov 2014)
New Revision: 62938
Modified:
grass/trunk/scripts/v.rast.stats/v.rast.stats.py
Log:
v.rast.stats: fix bug with infinity value (#2343)
Modified: grass/trunk/scripts/v.rast.stats/v.rast.stats.py
===================================================================
--- grass/trunk/scripts/v.rast.stats/v.rast.stats.py 2014-11-25 14:30:45 UTC (rev 62937)
+++ grass/trunk/scripts/v.rast.stats/v.rast.stats.py 2014-11-25 14:31:41 UTC (rev 62938)
@@ -267,8 +267,9 @@
variable = variables_dbf[variable]
i = variables[variable]
value = vars[i]
- # convert nan, +nan, -nan to NULL
- if value.lower().endswith('nan'):
+ # convert nan, +nan, -nan, inf, +inf, -inf, Infinity, +Infinity,
+ # -Infinity to NULL
+ if value.lower().endswith('nan') or 'inf' in value.lower():
value = 'NULL'
if not first_var:
f.write(" , ")
More information about the grass-commit
mailing list