[GRASS-SVN] r71690 - grass/branches/releasebranch_7_2/raster/r.stream.extract

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Nov 12 04:48:58 PST 2017


Author: neteler
Date: 2017-11-12 04:48:58 -0800 (Sun, 12 Nov 2017)
New Revision: 71690

Modified:
   grass/branches/releasebranch_7_2/raster/r.stream.extract/r.stream.extract.html
Log:
r.stream.extract manual: example fixed

Modified: grass/branches/releasebranch_7_2/raster/r.stream.extract/r.stream.extract.html
===================================================================
--- grass/branches/releasebranch_7_2/raster/r.stream.extract/r.stream.extract.html	2017-11-12 12:48:11 UTC (rev 71689)
+++ grass/branches/releasebranch_7_2/raster/r.stream.extract/r.stream.extract.html	2017-11-12 12:48:58 UTC (rev 71690)
@@ -169,7 +169,7 @@
 g.region -p raster=elev_ned_30m at PERMANENT
 
 # calculate flow accumulation
-r.watershed ele=elev_ned_30m at PERMANENT acc=elevation.10m.acc
+r.watershed ele=elev_ned_30m at PERMANENT acc=elev_ned_30m.acc
 
 # curvature to get narrow valleys
 r.param.scale input=elev_ned_30m at PERMANENT output=tangential_curv_5 size=5 method=crosc
@@ -183,7 +183,7 @@
 # create weight map
 r.mapcalc "weight = if(tangential_curv_5 < 0, -100 * tangential_curv_5, \
                     if(tangential_curv_7 < 0, -100 * tangential_curv_7, \
-		    if(tangential_curv_11 < 0, -100 * tangential_curv_11, 0.000001)))"
+                    if(tangential_curv_11 < 0, -100 * tangential_curv_11, 0.000001)))"
 
 # weigh accumulation map
 r.mapcalc expr="elev_ned_30m.acc.weighed = elev_ned_30m.acc * weight"
@@ -219,10 +219,14 @@
 		 stream_rast=elev_ned_30m.streams.noweight
 
 # extract streams from weighed map
+# requires a priori no-data filtering
+r.mapcalc "MASK = if(isnull(elev_ned_30m_acc_weighed), null(), 1)"
+
 r.stream.extract elevation=elev_ned_30m at PERMANENT \
                  accumulation=elev_ned_30m.acc.weighed \
 		 threshold=1000 \
 		 stream_rast=elev_ned_30m.streams
+r.mask -r
 </pre></div>
 
 <p>



More information about the grass-commit mailing list