[GRASS-SVN] r73555 - grass-addons/grass7/imagery/i.segment.stats

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 15 23:46:08 PDT 2018


Author: mlennert
Date: 2018-10-15 23:46:08 -0700 (Mon, 15 Oct 2018)
New Revision: 73555

Modified:
   grass-addons/grass7/imagery/i.segment.stats/i.segment.stats.py
Log:
i.segment.stats: change 'nan' to 'NULL' in SQL


Modified: grass-addons/grass7/imagery/i.segment.stats/i.segment.stats.py
===================================================================
--- grass-addons/grass7/imagery/i.segment.stats/i.segment.stats.py	2018-10-16 01:52:04 UTC (rev 73554)
+++ grass-addons/grass7/imagery/i.segment.stats/i.segment.stats.py	2018-10-16 06:46:08 UTC (rev 73555)
@@ -347,6 +347,7 @@
 		if len(output_dict[key]) + 1  == len(output_header):
                     sql = "INSERT INTO %s VALUES (%s, %s);\n" % (temporary_vect, key, ",".join(output_dict[key]))
                     sql = sql.replace('inf', 'NULL')
+                    sql = sql.replace('nan', 'NULL')
                     fsql.write(sql)
 		else:
 		    if not csvfile:



More information about the grass-commit mailing list