[GRASS-SVN] r71815 - grass/branches/releasebranch_7_2/raster/r.watershed/front

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Nov 23 17:38:55 PST 2017


Author: wenzeslaus
Date: 2017-11-23 17:38:55 -0800 (Thu, 23 Nov 2017)
New Revision: 71815

Modified:
   grass/branches/releasebranch_7_2/raster/r.watershed/front/main.c
   grass/branches/releasebranch_7_2/raster/r.watershed/front/r.watershed.html
Log:
r.watershed: describe drainage direction format, fix HTML syntax (backport r71806 and r71810 to 7.2)

Modified: grass/branches/releasebranch_7_2/raster/r.watershed/front/main.c
===================================================================
--- grass/branches/releasebranch_7_2/raster/r.watershed/front/main.c	2017-11-24 01:38:11 UTC (rev 71814)
+++ grass/branches/releasebranch_7_2/raster/r.watershed/front/main.c	2017-11-24 01:38:55 UTC (rev 71815)
@@ -154,7 +154,8 @@
 
     opt9 = G_define_standard_option(G_OPT_R_OUTPUT);
     opt9->key = "drainage";
-    opt9->description = _("Name for output drainage direction raster map");
+    opt9->label = _("Name for output drainage direction raster map");
+    opt9->description = _("Directions numbered from 1 to 8");
     opt9->required = NO;
     opt9->guisection = _("Outputs");
 

Modified: grass/branches/releasebranch_7_2/raster/r.watershed/front/r.watershed.html
===================================================================
--- grass/branches/releasebranch_7_2/raster/r.watershed/front/r.watershed.html	2017-11-24 01:38:11 UTC (rev 71814)
+++ grass/branches/releasebranch_7_2/raster/r.watershed/front/r.watershed.html	2017-11-24 01:38:55 UTC (rev 71815)
@@ -356,12 +356,13 @@
 cells in the stream segments output with negative drainage direction.
 These points can be used as start points
 for <em><a href="r.water.outlet.html">r.water.outlet</a></em> or
-<em><a href="v.net.iso.html">v.net.iso<a/></em>.
+<em><a href="v.net.iso.html">v.net.iso</a></em>.
 
 <p>
 To create <i>river mile</i> segmentation from a vectorized streams
 map, try
-the <em><a href="v.net.iso.html">v.net.iso<a/></em> or <em><a href="v.lrs.segment.html">v.lrs.segment</a></em>
+the <em><a href="v.net.iso.html">v.net.iso</a></em>
+or <em><a href="v.lrs.segment.html">v.lrs.segment</a></em>
 modules.
 
 <p>
@@ -377,6 +378,28 @@
 The basin threshold must have been sufficiently small to isolate a
 stream network and subbasins within the larger basin.
 
+<p>
+Given that the <b>drainage</b> is 8 directions numbered
+counter-clockwise starting from 1 in north-east direction,
+multiplying the output
+by 45 (by <tt>45.</tt> to get a double precision floating point raster
+map in <em><a href="r.mapcalc.html">r.mapcalc</a></em>) gives
+the directions in degrees. For most applications, zeros
+which indicate depressions specified by <b>depression</b>
+and negative values which indicate runoff leaving the region
+should be replaced by NULL (<tt>null()</tt> in
+<em><a href="r.mapcalc.html">r.mapcalc</a></em>).
+The following command performs these replacements:
+
+<div class="code"><pre>
+r.mapcalc "drainage_degrees = if(drainage > 0, 45. * drainage, null())"
+</pre></div>
+
+Alternatively, the user can use the <b>-a</b> flag or later the
+<tt>abs()</tt> function in
+<em><a href="r.mapcalc.html">r.mapcalc</a></em> if the runoff is leaving
+the region.
+
 <h2>EXAMPLES</h2>
 
 These examples use the Spearfish sample dataset.



More information about the grass-commit mailing list