[GRASS-SVN] r71689 - grass/trunk/raster/r.stream.extract

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


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

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

Modified: grass/trunk/raster/r.stream.extract/r.stream.extract.html
===================================================================
--- grass/trunk/raster/r.stream.extract/r.stream.extract.html	2017-11-12 12:47:19 UTC (rev 71688)
+++ grass/trunk/raster/r.stream.extract/r.stream.extract.html	2017-11-12 12:48:11 UTC (rev 71689)
@@ -170,7 +170,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
@@ -184,7 +184,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"
@@ -220,10 +220,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