[GRASS-SVN] r59451 - grass-addons/grass7/raster/r.stream.channel

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Mar 27 10:53:23 PDT 2014


Author: neteler
Date: 2014-03-27 10:53:23 -0700 (Thu, 27 Mar 2014)
New Revision: 59451

Modified:
   grass-addons/grass7/raster/r.stream.channel/main.c
   grass-addons/grass7/raster/r.stream.channel/r.stream.channel.html
Log:
r.stream.channel manual: HTML beautified

Modified: grass-addons/grass7/raster/r.stream.channel/main.c
===================================================================
--- grass-addons/grass7/raster/r.stream.channel/main.c	2014-03-27 17:44:15 UTC (rev 59450)
+++ grass-addons/grass7/raster/r.stream.channel/main.c	2014-03-27 17:53:23 UTC (rev 59451)
@@ -119,7 +119,7 @@
 
     flag_cells = G_define_flag();
     flag_cells->key = 'c';
-    flag_cells->description = _("Calculate distance in cell (ignored local)");
+    flag_cells->description = _("Calculate distance in cell count (ignored local)");
 
     flag_segmentation = G_define_flag();
     flag_segmentation->key = 'm';

Modified: grass-addons/grass7/raster/r.stream.channel/r.stream.channel.html
===================================================================
--- grass-addons/grass7/raster/r.stream.channel/r.stream.channel.html	2014-03-27 17:44:15 UTC (rev 59450)
+++ grass-addons/grass7/raster/r.stream.channel/r.stream.channel.html	2014-03-27 17:53:23 UTC (rev 59451)
@@ -1,7 +1,7 @@
 <h2>DESCRIPTION</h2>
-<p>
-Module <em>r.stream.channel</em> is prepared to calculate some local properties of the
-stream network. It is supplementary module for <em>r.stream.order</em>, and
+
+The module <em>r.stream.channel</em> is prepared to calculate some local properties
+of the stream network. It is supplementary module for <em>r.stream.order</em>, and
 <em>r.stream.distance</em> to investigate channel subsystem. For slope subsystem
 parameters is <em>r.stream.slope</em>. It may use ordered or unordered network. It
 calculate parameters for every segment between it init to outlet/join to the
@@ -13,78 +13,69 @@
 
 <h2>OPTIONS</h2>
 <dl>
-<dt><b>-l</b></dt>
-<dd>Calculate local values. See output for details.</dd>
-<dt><b>-c</b></dt>
-<dd>Calculate distance in cells instead of meters. See output for details.</dd>
 <dt><b>-d</b></dt>
+<!-- TODO: understand what -d does, see main.c description -->
 <dd>Calculate downstream distance (from current cell DOWNSTREAM to outlet/join).
 Default is upstream (from current cell upstream to init/join.</dd>
 <dt><b>-m</b></dt>
-<dd>Only for very large data sets. Use segment library to optimize memory
+<dd>Only for very large data sets. Uses segment library to optimize memory
 consumption during analysis</dd>
 <dt><b>stream_rast</b></dt>
-<dd>Stream network: name of input stream map. Map may be ordered according one
-of the <em>r.stream.order</em> ordering system as well as unordered (with original stream
-identifiers). Because streams network produced by <em>r.watershed</em> and
+<dd>Stream network: name of input stream map. Map may be ordered according to one
+of the <em>r.stream.order</em> ordering systems as well as unordered (with original stream
+identifiers). Because the streams network produced by <em>r.watershed</em> and
 <em>r.stream.extract</em> may slightly differ in detail it is required to use both stream
-and direction map produced by the same module. Stream background shall have NULL
-value or zero value. Background values of NULL are by default produced by
-<em>r.watershed</em> and <em>r.stream.extract</em>. If not 0 or NULL use <em><a
-href="r.mapcalc.html">r.mapcalc</a></em> to set background values to null.  
-</dd>
+and direction map produced by the same module. Non-stream cell values must be
+set to NULL.</dd>
 <dt><b>direction</b></dt>
-<dd>Flow direction: name of input direction map produced by r.watershed or
-<em>r.stream.extract</em>. If <em>r.stream.extract</em> output map is used, it only has non-NULL
-values in places where streams occur. NULL (nodata) cells are ignored, zero and
-negative values are valid direction data if they vary from -8 to 8 (CCW from
-East in steps of 45 degrees). Direction map shall be of type CELL values. Region
-resolution and map resolution must be the same. 
-Also <em>stream</em> network map must have the same resolution. It is checked by
-default. If resolutions differ the module informs about it and stops. Region
-boundary and maps boundary may be differ but it may lead to unexpected
+<dd>Flow direction: name of input direction map produced by
+<em>r.watershed</em> or <em>r.stream.extract</em>. If the <em>r.stream.extract</em>
+output map is used, it contains non-NULL values only in places where streams are
+present. NULL cells are ignored; zero and negative values are valid direction data
+if they vary from -8 to 8 (CCW from East in steps of 45 degrees). The direction 
+map shall be of integer type (CELL). The region resolution and map resolution
+must be the same. Also the <em>stream_rast</em> network map must have the same
+resolution. If resolutions differ the module informs about it and stops. Region
+boundary and maps boundary may be different but it may lead to unexpected
 results.</dd>
 <dt><b>elevation</b></dt>
 <dd>Elevation: name of input elevation map. Map can be of type CELL, FCELL or
 DCELL. It is not restricted to resolution of region settings as streams and
 direction.</dd>
-</dl>
-<h2>OUTPUTS</h2>
-<dl>
 <dt><b>distance</b></dt>
 <dd>Upstream distance of current cell to the init/join. Flag modifications: <br>
-<b>d:</b> downstream distance of current cell to the join/outlet;<br>
-<b>l:</b> local distance between current cell and next cell. In most cases cell
+<b>-d:</b> downstream distance of current cell to the join/outlet;<br>
+<b>-l:</b> local distance between current cell and next cell. In most cases cell
 resolution and sqrt2 of cell resolution. useful when projection is LL or NS and
-WE resolutions differs. Flag d ignored<br>
-<b>c:</b> distance in cells. Map is written as double. Use <em>r.mapcalc</em> to convert
-to integer. Flags l and d ignored.<br>
+WE resolutions differs. Flag <b>-d</b> ignored<br>
+<b>-c:</b> distance in cells. Map is written as double. Use <em>r.mapcalc</em> to convert
+to integer. Flags <b>-l</b> and <b>-d</b> ignored.<br>
 </dd>
 <dt><b>difference</b></dt>
 <dd>Upstream elevation difference between current cell to the init/join. It we
 need to calculate parameters different than elevation. If we need to calculate
 different parameters than elevation along streams (for example precipitation or
 so) use necessary map as elevation. Flag modifications: <br>
-<b>d:</b> downstream difference of current cell to the join/outlet;<br>
-<b>l:</b> local difference between current cell and next cell. With flag
+<b>-d:</b> downstream difference of current cell to the join/outlet;<br>
+<b>-l:</b> local difference between current cell and next cell. With flag
 calculates difference between previous cell and current cell<br>
-<b>c:</b> Ignored.
+<b>-c:</b> Ignored.
 </dd>
 <dt><b>gradient</b></dt>
-<dd>Upstream mean gradient between current cell and the init/join.  Flag
+<dd>Upstream mean gradient between current cell and the init/join. Flag
 modifications: <br>
-<b>d:</b> downstream mean gradient between current cell and the the
+<b>-d:</b> downstream mean gradient between current cell and the
 join/outlet;<br>
-<b>l:</b> local gradient between current cell and next cell. Flag d ignored<br>
-<b>c:</b> Ignored.
+<b>-l:</b> local gradient between current cell and next cell. Flag <b>-d</b> ignored<br>
+<b>-c:</b> Ignored.
 </dd>
 <dt><b>curvature</b></dt>
 <dd>Local stream course curvature  of current cell. Calculated according
 formula: <i>first_derivative/(1-second_derivative<sup>2</sup>)<sup>3/2</sup></i>
 Flag modifications: <br>
-<b>d:</b> ignored;<br>
-<b>l:</b> Ignored.<br>
-<b>c:</b> Ignored.
+<b>-d:</b> ignored;<br>
+<b>-l:</b> Ignored.<br>
+<b>-c:</b> Ignored.
 </dd>
 <dt><b>identifier</b></dt>
 <dd> Integer map: In ordered stream network there are more than one segment
@@ -99,15 +90,17 @@
 stream of the catchment:
 
 <div class="code"><pre>
-g.region -p -a rast=elevation align=elevation
+g.region -p -a rast=elevation
 r.watershed elevation=elevation threshold=10000 drainage=direction stream=streams
 r.stream.order streams=streams direction=direction hack=hack
-r.stream.channel streams=hack direction=direction elevation=elevation identifier=stream_identifier distance=stream_distance gradient=stream_gradient
-#495 is a stream identifier. May be different in different situation
+r.stream.channel streams=hack direction=direction elevation=elevation \
+  identifier=stream_identifier distance=stream_distance gradient=stream_gradient
+
+# Eg., 495 is a stream identifier. May be different in different situation
 r.mapcalc stgrad=if(stream_identifier==495,float(stream_gradient),null())
 r.mapcalc stdist=if(stream_identifier==495,float(stream_distance),null())
 
-#the rest data processing in R
+# Use R for plotting
 R
 library(spgrass6)
 r=readRAST6(c("stdist","stgrad"),NODATA=-9999)
@@ -118,7 +111,14 @@
 
 <h2>SEE ALSO</h2>
 
-<em><a href="r.watershed.html">r.watershed</a>, <a href="r.stream.extract.html">r.stream.extract</a>, <a href="r.stream.order.html">r.stream.order</a>, <a href="r.stream.basins.html">r.stream.basins</a>, <a href="r.stream.slope.html">r.stream.slope</a>, <a href="r.stream.stats.html">r.stream.stats</a>, <a href="r.mapcalc.html">r.mapcalc</a>
+<em>
+<a href="r.watershed.html">r.watershed</a>,
+<a href="r.stream.extract.html">r.stream.extract</a>,
+<a href="r.stream.order.html">r.stream.order</a>,
+<a href="r.stream.basins.html">r.stream.basins</a>,
+<a href="r.stream.slope.html">r.stream.slope</a>,
+<a href="r.stream.stats.html">r.stream.stats</a>,
+<a href="r.mapcalc.html">r.mapcalc</a>
 </em>
 
 <h2>AUTHOR</h2>



More information about the grass-commit mailing list