[GRASS-SVN] r72330 - grass-addons/grass7/imagery/i.segment.uspo

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 7 03:56:18 PST 2018


Author: mlennert
Date: 2018-03-07 03:56:17 -0800 (Wed, 07 Mar 2018)
New Revision: 72330

Modified:
   grass-addons/grass7/imagery/i.segment.uspo/i.segment.uspo.html
   grass-addons/grass7/imagery/i.segment.uspo/i.segment.uspo.py
Log:
i.segment.uspo: delete warning about deprecated flags (after 10 months of warning); clarify/correct documentation


Modified: grass-addons/grass7/imagery/i.segment.uspo/i.segment.uspo.html
===================================================================
--- grass-addons/grass7/imagery/i.segment.uspo/i.segment.uspo.html	2018-03-06 17:00:28 UTC (rev 72329)
+++ grass-addons/grass7/imagery/i.segment.uspo/i.segment.uspo.html	2018-03-07 11:56:17 UTC (rev 72330)
@@ -7,10 +7,6 @@
 For the mean shift algorithm, you can also activate adaptive bandwidth using
 the <em>-a</em> flag.
 
-<p>The module then selects the parameters providing the highest values of a
-given optimization function. The number of "best" parameter combinations to 
-provide to the user per <b>region</b> is defined by <b>number_best</b>.
-
 <p>The user provides an imagery <b>group</b> and the name of an <b>output</b>
 text file where parameter and optimization values for all tested segmentations
 are stored. The user can either give a list of thresholds and minimum sizes, or
@@ -19,6 +15,10 @@
 to not test the entire image, but rather to test specific areas in the image
 that might be characterstic for specific types of land cover.
 
+<p>The module then selects the parameters providing the highest values of a
+given optimization function. The number of "best" parameter combinations to 
+provide to the user per <b>region</b> is defined by <b>number_best</b>.
+
 <p>Two optimization functions are available via the <b>optimization_function</b>
 parameter: A simple sum of the normalized criteria values as defined by
 Espindola et al (2006), or the F-function as defined by Johnson et al (2015).
@@ -65,15 +65,13 @@
 minsize in the final run of <a href="i.segment.html">i.segment</a> depending 
 on the desired minimum mapping unit.
 
-<p> In hierarchical segmentation mode, the processes are divided between
-different calls to <a
-href="https://grass.osgeo.org/grass70/manuals/addons/i.segment.hierarchical.html">i.segment.hierarchical</a>.  This
-means that when some of these calls are much longer than others, the work load
-is not evenly divided between cores. This is especially true if one explores a
-large number of thresholds with minsizes of significantly different levels.
+<p> In hierarchical segmentation mode, each segmentation is used as seed for 
+the next hierarchical level. This means that these segmentations have to be
+run sequentially. Currently, parallelization is thus only used if more than one
+value was given for <em>minsize</em>. In a future version, parallelization 
+should optionally be run by region if the number of regions is larger than
+the number of different <em>minsize</em> values.
 
-
-
 <h2>EXAMPLE</h2>
 
 <div class="code"><pre> 

Modified: grass-addons/grass7/imagery/i.segment.uspo/i.segment.uspo.py
===================================================================
--- grass-addons/grass7/imagery/i.segment.uspo/i.segment.uspo.py	2018-03-06 17:00:28 UTC (rev 72329)
+++ grass-addons/grass7/imagery/i.segment.uspo/i.segment.uspo.py	2018-03-07 11:56:17 UTC (rev 72330)
@@ -265,11 +265,6 @@
 #%end
 #
 #%flag
-#% key: n
-#% description: Non-hierarchical segmentation (DEPRECATED: This is now the default setting)
-#%end
-#
-#%flag
 #% key: h
 #% description: Use hierarchical segmentation
 #%end
@@ -653,17 +648,6 @@
     if flags['k']:
         keep = True
     hierarchical_segmentation = False
-    if not flags['n'] and not flags['h']:
-        message = "There has been a change in API:\n"
-        message += "Non-hierarchical segmentation is now default.\n"
-        message += "If you want hierarchical segmentation, use the 'h' flag."
-        gscript.warning(message)
-    if flags['n']:
-        message = "The 'n' flag is deprecated.\n"
-        message += "Non-hierarchical segmentation is now the default.\n"
-        message += "For hierarchical segmentation set the '-h' flag.\n"
-        message += "The '-n' flag will soon be removed."
-        gscript.warning(message)
     if flags['h']:
         hierarchical_segmentation = True
         message = "INFO: Using hierarchical segmentation.\n"



More information about the grass-commit mailing list