[GRASS-CVS] markus: grass6/raster/r.watershed/front description.html, 1.7,

grass at intevation.de grass at intevation.de
Sun Nov 18 14:50:23 EST 2007

Author: markus

Update of /grassrepository/grass6/raster/r.watershed/front
In directory doto:/tmp/cvs-serv22935

Modified Files:
      Tag: releasebranch_6_3
Log Message:
updated (merge from HEAD)

Index: description.html
RCS file: /grassrepository/grass6/raster/r.watershed/front/description.html,v
retrieving revision 1.7
retrieving revision
diff -u -d -r1.7 -r1.7.2.1
--- description.html	20 Nov 2006 05:24:04 -0000	1.7
+++ description.html	18 Nov 2007 19:50:21 -0000
@@ -215,8 +215,9 @@
 Both versions use the A<sup>T</sup> least-cost search algorithm to determine
-the flow of water over the landscape (see SEE ALSO section).  The algorithm
-produces results similar to those obtained when running
+the flow of water over the landscape (see <a href="#seealso">SEE ALSO</a>
+The algorithm produces results similar to those obtained when running
 <EM><A HREF="r.cost.html">r.cost</A></EM> and
 <EM><A HREF="r.drain.html">r.drain</A></EM> on every cell on the map.
@@ -260,10 +261,35 @@
 Zero data values will be treated as elevation data (not no_data).
+To isolate an individual river network using the output of this module,
+a number of approaches may be considered.
+<LI>Use a resample of the basins catchment raster map as a MASK.<BR>
+  The equivalent vector map method is similar using <em>v.select</em> or
+  <em>v.overlay</em>.
+<LI>Use the <em>r.cost</em> module with a point in the river as a starting
+  point.
+<LI>Use the <em>v.net.iso</em> module with a node in the river as a
+  starting point.
+To create <i>river mile</i> segmentation from a vectorized streams map,
+try the <em>v.net.iso</em> or <em>v.lrs.segment</em> modules.
+<i>These examples use the Spearfish sample dataset.</i>
 Convert <em>r.watershed</em> streams map output to a vector layer.
+If you want a detailed stream network, set the threshold option
+small to create lots of catchment basins, as only one stream is
+presented per catchment. The r.to.vect -v flag preserves the
+catchment ID as the vector category number.
 <div class="code"><pre>
   r.watershed elev=elevation.dem stream=rwater.stream
   r.to.vect -v in=rwater.stream out=rwater_stream
@@ -297,7 +323,58 @@
+Create a more detailed stream map using the accumulation map and convert
+it to a vector output map. The accumulation cut-off, and therefore fractal
+dimension, is arbitrary; in this example we use the map's mean number of
+upstream catchment cells (calculated in the above example by <em>r.univar</em>)
+as the cut-off value.
+<div class="code"><pre>
+  r.watershed elev=elevation.dem accum=rwater.accum
+  r.mapcalc 'MASK = if(!isnull(elevation.dem))'
+  r.mapcalc "rwater.course = \
+   if( abs(rwater.accum) > $mean_of_abs, \
+       abs(rwater.accum), \
+       null() )"
+  r.colors -g rwater.course col=bcyr
+  g.remove MASK
+  # <i>Thinning is required before converting raster lines to vector</i>
+  r.thin in=rwater.course out=rwater.course.Thin
+  r.colors -gn rwater.course.Thin color=grey
+  r.to.vect in=rwater.course.Thin out=rwater_course feature=line
+  v.db.dropcol map=rwater_course column=label
+<!-- can't set line attribute to catchment it is in as v.what.rast and 
+  v.distance only work for point features. Could create endpoint node
+  points map and upload to that ?? -->
+<!-- Note value column containing accumulation cells in output vector
+  may not necessarily reference the downstream end of the line! drop it? -->
+Create watershed basins map and convert to a vector polygon map
+<div class="code"><pre>
+  r.watershed elev=elevation.dem basin=rwater.basin thresh=15000
+  r.to.vect -s in=rwater.basin out=rwater_basins feature=area
+  v.db.dropcol map=rwater_basins column=label
+  v.db.renamecol map=rwater_basins column=value,catchment
+Display output in a nice way
+<div class="code"><pre>
+  r.shaded.relief map=elevation.dem
+  d.shadedmap rel=elevation.dem.shade drape=rwater.basin bright=40
+  d.vect rwater_course color=orange
+<a name="seealso"></a>
 <H2>SEE ALSO</H2>
 Ehlschlaeger, C. (1989). <i>Using the A<sup>T</sup> Search Algorithm
 to Develop Hydrologic Models from Digital Elevation Data</i>,

More information about the grass-commit mailing list