[GRASS-SVN] r65483 - grass-addons/grass7/raster/r.smooth.seg

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 16 07:16:54 PDT 2015


Author: neteler
Date: 2015-06-16 07:16:54 -0700 (Tue, 16 Jun 2015)
New Revision: 65483

Modified:
   grass-addons/grass7/raster/r.smooth.seg/main.c
   grass-addons/grass7/raster/r.smooth.seg/r.smooth.seg.html
Log:
r.smooth.seg Addon: fix keywords; HTML cosmetics

Modified: grass-addons/grass7/raster/r.smooth.seg/main.c
===================================================================
--- grass-addons/grass7/raster/r.smooth.seg/main.c	2015-06-16 10:11:37 UTC (rev 65482)
+++ grass-addons/grass7/raster/r.smooth.seg/main.c	2015-06-16 14:16:54 UTC (rev 65483)
@@ -29,6 +29,7 @@
 #include <string.h>
 #include <grass/gis.h>
 #include <grass/raster.h>
+#include <grass/config.h>
 #include <grass/glocale.h>
 #include "varseg.h"
 
@@ -71,8 +72,9 @@
 
     /* initialize module */
     module = G_define_module();
+    G_add_keyword(_("raster"));
+    G_add_keyword(_("segmentation"));
     G_add_keyword(_("imagery"));
-    G_add_keyword(_("segmentation"));
     G_add_keyword(_("edge detection"));
     G_add_keyword(_("smoothing"));
     module->description =

Modified: grass-addons/grass7/raster/r.smooth.seg/r.smooth.seg.html
===================================================================
--- grass-addons/grass7/raster/r.smooth.seg/r.smooth.seg.html	2015-06-16 10:11:37 UTC (rev 65482)
+++ grass-addons/grass7/raster/r.smooth.seg/r.smooth.seg.html	2015-06-16 14:16:54 UTC (rev 65483)
@@ -16,20 +16,20 @@
 shortened too much when the parameter alpha is set to very high values,
 (this happens very rarely). <br>
 
-An overview of the underlying theory with some applications cab be found in 
+An overview of the underlying theory with some applications can be found in 
 <a href="http://dx.doi.org/10.1016/j.isprsjprs.2012.02.005">[3]</a>.<br>
 Other examples of use of the module can be found 
 <a href="http://www.ing.unitn.it/~vittia/sw/sw_index.html">here</a> 
 and in 
-<a href="http://download.osgeo.org/osgeo/foss4g/2009/SPREP/2Thu/Parkside%20GO4/1500/Thu%20G04%201545%20Zatelli.pdf"
->this presentation [FOSS4G 2009 - pdf]</a>. <br>
+<a href="http://download.osgeo.org/osgeo/foss4g/2009/SPREP/2Thu/Parkside%20GO4/1500/Thu%20G04%201545%20Zatelli.pdf">this presentation [FOSS4G 2009 - pdf]</a>.<br>
 For details on the numerical implementation see [4].
 
 <h2>NOTES</h2>
 Remove any MASK before the execution of the module.
 <br><br>
 
-Replace any NULL data (using <em>r.null</em>) with the map average value (get it with <em>r.univar</em>).
+Replace any NULL data (using <em>r.null</em>) with the map average value (calculate
+it with <em>r.univar</em>).
 <br><br>
 
 The segmentation depends on the parameters alpha and lambda:
@@ -86,23 +86,21 @@
 
 <h2>EXAMPLE</h2>
 
-This example is based the <a
-href="http://grass.OSGeo.org/download/data.php">North Carolina GRASS sample
-data set</a>, [complete GRASS location].
+This example is based on the
+<a href="http://grass.osgeo.org/download/sample-data">North Carolina GRASS sample data set</a>:
 
-
 <div><pre class="code">
 # set the region to match the <em>ortho_2001_t792_1m</em> raster map:
-g.region rast=ortho_2001_t792_1m
+g.region raster=ortho_2001_t792_1m -p
 
 # select a smaller region:
-g.region n=221725 s=220225 w=638350 e=639550
+g.region n=221725 s=220225 w=638350 e=639550 -p
 
 # run r.smooth.seg:
-r.smooth.seg in_g=ortho_2001_t792_1m at PERMANENT out_u=u_OF out_z=z_OF lambda=10 alpha=200 mxi=250
+r.smooth.seg in_g=ortho_2001_t792_1m out_u=u_OF out_z=z_OF lambda=10 alpha=200 mxi=250
 
 # for a better visualization of the output raster map <em>u_OF</em>, set its color table to:
-r.colors u_OF rast=ortho_2001_t792_1m
+r.colors u_OF raster=ortho_2001_t792_1m
 
 # compute the difference between the input raster map and the output raster map <em>u_OF</em>:
 r.mapcalc "diff = abs(ortho_2001_t792_1m at PERMANENT - u_OF)"
@@ -117,10 +115,10 @@
 r.colors z_OF color=bgyr
 
 # run r.smooth.seg with different parameter values:
-r.smooth.seg in_g=ortho_2001_t792_1m at PERMANENT out_u=u1_OF out_z=z1_OF lambda=10 alpha=65 mxi=250
-r.smooth.seg in_g=ortho_2001_t792_1m at PERMANENT out_u=u2_OF out_z=z2_OF lambda=10 alpha=600 mxi=250
-r.smooth.seg in_g=ortho_2001_t792_1m at PERMANENT out_u=u3_OF out_z=z3_OF lambda=0.1 alpha=200 mxi=250
-r.smooth.seg in_g=ortho_2001_t792_1m at PERMANENT out_u=u4_OF out_z=z4_OF lambda=1 alpha=200 mxi=250
+r.smooth.seg in_g=ortho_2001_t792_1m out_u=u1_OF out_z=z1_OF lambda=10 alpha=65 mxi=250
+r.smooth.seg in_g=ortho_2001_t792_1m out_u=u2_OF out_z=z2_OF lambda=10 alpha=600 mxi=250
+r.smooth.seg in_g=ortho_2001_t792_1m out_u=u3_OF out_z=z3_OF lambda=0.1 alpha=200 mxi=250
+r.smooth.seg in_g=ortho_2001_t792_1m out_u=u4_OF out_z=z4_OF lambda=1 alpha=200 mxi=250
 
 # visualize and compare the different results
 </pre></div>
@@ -152,10 +150,12 @@
 
 <h2>SEE ALSO</h2>
 
-<em><a href="r.clump.html">r.clump</a></em>,
-<em><a href="i.smap.html">i.smap</a></em>,
-<em><a href="i.zc.html">i.zc</a></em>,
-<em><a href="r.mfilter.html">r.mfilter</a></em>
+<em>
+<a href="i.smap.html">i.smap</a>,
+<a href="i.zc.html">i.zc</a>,
+<a href="r.clump.html">r.clump</a>,
+<a href="r.mfilter.html">r.mfilter</a>
+</em>
 
 
 <h2>AUTHOR</h2>



More information about the grass-commit mailing list