[GRASS-SVN] r71822 - grass-addons/grass7/imagery/i.segment.stats
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Nov 25 05:11:08 PST 2017
Author: mlennert
Date: 2017-11-25 05:11:08 -0800 (Sat, 25 Nov 2017)
New Revision: 71822
Modified:
grass-addons/grass7/imagery/i.segment.stats/i.segment.stats.py
Log:
i.segment.stats: fix #3453 and object error output
Modified: grass-addons/grass7/imagery/i.segment.stats/i.segment.stats.py
===================================================================
--- grass-addons/grass7/imagery/i.segment.stats/i.segment.stats.py 2017-11-24 23:14:41 UTC (rev 71821)
+++ grass-addons/grass7/imagery/i.segment.stats/i.segment.stats.py 2017-11-25 13:11:08 UTC (rev 71822)
@@ -218,11 +218,7 @@
firstline = False
continue
values = line.rstrip().split('|')
- values = line.rstrip().split('|')
- if area_measures:
- output_dict[values[0]] = output_dict[values[0]]+ [values[x] for x in stat_indices]
- else:
- output_dict[values[0]] = [values[x] for x in stat_indices]
+ output_dict[values[0]] = output_dict[values[0]] + [values[x] for x in stat_indices]
message = _("Some values could not be calculated for the objects below. ")
message += _("These objects are thus not included in the results. ")
@@ -276,9 +272,9 @@
gscript.run_command('v.db.connect', map_=vectormap, table=vectormap, quiet=True)
if error_objects:
- object_string = ', '.join(error_objects)
- message += _("\n\nObjects with errors: %s" % object_string)
- gscript.warning(message)
+ object_string = ', '.join(error_objects[:100])
+ message += _("\n\nObjects with errors (only first 100 are shown):\n%s" % object_string)
+ gscript.message(message)
if __name__ == "__main__":
More information about the grass-commit
mailing list