[GRASS-SVN] r68096 - grass-addons/grass7/imagery/i.segment.uspo
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Mar 21 08:11:57 PDT 2016
Author: mlennert
Date: 2016-03-21 08:11:57 -0700 (Mon, 21 Mar 2016)
New Revision: 68096
Modified:
grass-addons/grass7/imagery/i.segment.uspo/i.segment.uspo.py
Log:
i.segment.uspo: create shorter map names for final ranked maps
Modified: grass-addons/grass7/imagery/i.segment.uspo/i.segment.uspo.py
===================================================================
--- grass-addons/grass7/imagery/i.segment.uspo/i.segment.uspo.py 2016-03-21 13:39:40 UTC (rev 68095)
+++ grass-addons/grass7/imagery/i.segment.uspo/i.segment.uspo.py 2016-03-21 15:11:57 UTC (rev 68096)
@@ -622,7 +622,7 @@
rank = 1
for optind in optimal_indices:
best_values[region].append([threshlist[optind], minsizelist[optind], optlist[optind]])
- maps_to_keep.append([regional_maplist[optind], rank])
+ maps_to_keep.append([regional_maplist[optind], rank, region])
rank += 1
# Create output
@@ -663,9 +663,8 @@
# Keep copies of segmentation results with best values
if segmented_map:
- for bestmap, rank in maps_to_keep:
- segmented_map_name = segmented_map + "__rank%d" % rank
- outputmap = bestmap.replace(temp_segment_map, segmented_map_name)
+ for bestmap, rank, region in maps_to_keep:
+ outputmap = region + "__rank%d" % rank
gscript.run_command('g.copy',
raster=[bestmap,outputmap],
quiet=True,
More information about the grass-commit
mailing list