Parcourir la 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 il y a 7 ans
Parent
commit
f4540f44c5
2 fichiers modifiés avec 26 ajouts et 3 suppressions
  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->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");
 

+ 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.
 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 @@ 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
 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.