Browse Source

r.watershed: describe drainage direction format, fix HTML syntax

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@71806 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 7 years ago
parent
commit
f4540f44c5
2 changed files with 26 additions and 3 deletions
  1. 2 1
      raster/r.watershed/front/main.c
  2. 24 2
      raster/r.watershed/front/r.watershed.html

+ 2 - 1
raster/r.watershed/front/main.c

@@ -154,7 +154,8 @@ int main(int argc, char *argv[])
 
 
     opt9 = G_define_standard_option(G_OPT_R_OUTPUT);
     opt9 = G_define_standard_option(G_OPT_R_OUTPUT);
     opt9->key = "drainage";
     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->required = NO;
     opt9->guisection = _("Outputs");
     opt9->guisection = _("Outputs");
 
 

+ 24 - 2
raster/r.watershed/front/r.watershed.html

@@ -356,12 +356,13 @@ identified through their ultimate outlet points. These points are all
 cells in the stream segments output with negative drainage direction.
 cells in the stream segments output with negative drainage direction.
 These points can be used as start points
 These points can be used as start points
 for <em><a href="r.water.outlet.html">r.water.outlet</a></em> or
 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>
 <p>
 To create <i>river mile</i> segmentation from a vectorized streams
 To create <i>river mile</i> segmentation from a vectorized streams
 map, try
 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.
 modules.
 
 
 <p>
 <p>
@@ -377,6 +378,27 @@ as input to <em><a href="r.water.outlet.html">r.water.outlet</a></em>.
 The basin threshold must have been sufficiently small to isolate a
 The basin threshold must have been sufficiently small to isolate a
 stream network and subbasins within the larger basin.
 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>
 <h2>EXAMPLES</h2>
 
 
 These examples use the Spearfish sample dataset.
 These examples use the Spearfish sample dataset.