[GRASS-SVN] r69138 - grass/branches/releasebranch_7_0/raster/r.reclass

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 15 14:05:00 PDT 2016


Author: neteler
Date: 2016-08-15 14:05:00 -0700 (Mon, 15 Aug 2016)
New Revision: 69138

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

Modified: grass/branches/releasebranch_7_0/raster/r.reclass/r.reclass.html
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.reclass/r.reclass.html	2016-08-15 21:04:30 UTC (rev 69137)
+++ grass/branches/releasebranch_7_0/raster/r.reclass/r.reclass.html	2016-08-15 21:05:00 UTC (rev 69138)
@@ -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