[GRASS-SVN] r69136 - grass/trunk/raster/r.reclass

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 15 14:03:18 PDT 2016


Author: neteler
Date: 2016-08-15 14:03:18 -0700 (Mon, 15 Aug 2016)
New Revision: 69136

Modified:
   grass/trunk/raster/r.reclass/r.reclass.html
Log:
r.reclass manual: example added

Modified: grass/trunk/raster/r.reclass/r.reclass.html
===================================================================
--- grass/trunk/raster/r.reclass/r.reclass.html	2016-08-15 21:01:53 UTC (rev 69135)
+++ grass/trunk/raster/r.reclass/r.reclass.html	2016-08-15 21:03:18 UTC (rev 69136)
@@ -114,6 +114,8 @@
 
 <h2>EXAMPLES</h2>
 
+<h3>Reclass rules examples</h3>
+
 The following examples may help clarify the reclass rules.
 <p><dl>
 <dt> 
@@ -186,7 +188,46 @@
 the last label which was specified becomes the label for that category.
 In this case the labels are assigned exactly as in the two previous examples.
 
+<h3>Usage example</h3>
 
+In this example, the 21 classes of the landuse map (North Carolina sample
+dataset) are simplified to 7 classes:
+
+<div class="code"><pre>
+r.category landuse96_28m
+0	not classified
+1	High Intensity Developed
+2	Low Intensity Developed
+3	Cultivated
+[...]
+20	Water Bodies
+21      Unconsolidated Sediment
+
+# use this command or save rules with editor in textfile "landuserecl.txt"
+echo "0 = NULL
+1 2     = 1 developed
+3       = 2 agriculture
+4 6     = 3 herbaceous
+7 8 9   = 4 shrubland
+10 thru 18 = 5 forest
+20      = 6 water
+21      = 7 sediment" > landuserecl.txt
+
+r.reclass input=landuse96_28m output=landclass96_recl \
+  rules=landuserecl.txt \
+  title="Simplified landuse classes 1996"
+
+# verify result
+r.category landuse96_recl
+1	developed
+2	agriculture
+3	herbaceous
+4	shrubland
+5	forest
+6	water
+7	sediment
+</pre></div>
+
 <h2>SEE ALSO</h2>
 
 <em>



More information about the grass-commit mailing list