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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Oct 28 06:58:23 PDT 2017


Author: mlennert
Date: 2017-10-28 06:58:23 -0700 (Sat, 28 Oct 2017)
New Revision: 71602

Modified:
   grass-addons/grass7/imagery/i.segment.stats/i.segment.stats.py
Log:
i.segment.stats: add flag to suppress calculation of shape statistics (fix for #3426)

Modified: grass-addons/grass7/imagery/i.segment.stats/i.segment.stats.py
===================================================================
--- grass-addons/grass7/imagery/i.segment.stats/i.segment.stats.py	2017-10-28 08:11:26 UTC (rev 71601)
+++ grass-addons/grass7/imagery/i.segment.stats/i.segment.stats.py	2017-10-28 13:58:23 UTC (rev 71602)
@@ -76,6 +76,11 @@
 #% key: r
 #% description: Adjust region to input map
 #%END
+#%flag
+#% key: s
+#% description: Do not calculate any shape statistics
+#% guisection: shape_statistics
+#%end
 
 
 import os
@@ -111,7 +116,7 @@
     csvfile = options['csvfile'] if options['csvfile'] else []
     vectormap = options['vectormap'] if options['vectormap'] else []
     rasters = options['rasters'].split(',') if options['rasters'] else []
-    area_measures = options['area_measures'].split(',') if options['area_measures'] else []
+    area_measures = options['area_measures'].split(',') if (options['area_measures'] and not flags['s']) else []
     if area_measures:
 	if not gscript.find_program('r.object.geometry', '--help'):
 		message = _("You need to install the addon r.object.geometry to be able")



More information about the grass-commit mailing list