[GRASS-SVN] r71806 - grass/trunk/raster/r.watershed/front

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 22 20:05:58 PST 2017


Author: wenzeslaus
Date: 2017-11-22 20:05:58 -0800 (Wed, 22 Nov 2017)
New Revision: 71806

Modified:
   grass/trunk/raster/r.watershed/front/main.c
   grass/trunk/raster/r.watershed/front/r.watershed.html
Log:
r.watershed: describe drainage direction format, fix HTML syntax

Modified: grass/trunk/raster/r.watershed/front/main.c
===================================================================
--- grass/trunk/raster/r.watershed/front/main.c	2017-11-23 03:15:34 UTC (rev 71805)
+++ grass/trunk/raster/r.watershed/front/main.c	2017-11-23 04:05:58 UTC (rev 71806)
@@ -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 from east numbered from 1 to 9");
     opt9->required = NO;
     opt9->guisection = _("Outputs");
 

Modified: grass/trunk/raster/r.watershed/front/r.watershed.html
===================================================================
--- grass/trunk/raster/r.watershed/front/r.watershed.html	2017-11-23 03:15:34 UTC (rev 71805)
+++ grass/trunk/raster/r.watershed/front/r.watershed.html	2017-11-23 04:05:58 UTC (rev 71806)
@@ -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,27 @@
 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 9 directions numbered
+counterclockwise from east starting from 1, 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