[GRASS-SVN] r71348 - grass-addons/grass7/raster/r.width.funct

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 9 01:57:56 PDT 2017


Author: madi
Date: 2017-08-09 01:57:56 -0700 (Wed, 09 Aug 2017)
New Revision: 71348

Modified:
   grass-addons/grass7/raster/r.width.funct/r.width.funct.html
Log:
added example

Modified: grass-addons/grass7/raster/r.width.funct/r.width.funct.html
===================================================================
--- grass-addons/grass7/raster/r.width.funct/r.width.funct.html	2017-08-09 08:57:30 UTC (rev 71347)
+++ grass-addons/grass7/raster/r.width.funct/r.width.funct.html	2017-08-09 08:57:56 UTC (rev 71348)
@@ -20,6 +20,31 @@
 the plot of the Width Function. In x axis is reported the distance 
 and in y axis is the area.
 
+<h2>EXAMPLE</h2>
+
+North Carolina sample dataset example:
+
+<div class="code"><pre>
+g.region raster=elevation -p
+
+# Calculate flow direction
+r.stream.extract elevation=elevation threshold=1000 \
+direction=direction 
+
+# Create outlet point 
+echo "637304.924954,218617.100523" | v.in.ascii input=- sep=',' out=outlet
+
+# Convert outlet point to raster
+v.to.rast input=outlet type=point output=outlet use=cat
+
+# Calculate distance to outlet map
+r.stream.distance -o stream_rast=outlet \
+direction=direction distance=dist2out
+
+# Calculate width function
+r.width.funct map=dist2out image=/tmp/my_basin=1000
+</pre></div>
+
 <h3>Dependencies</h3>
 <ul>
 <li>Matplotlib</li>



More information about the grass-commit mailing list