[GRASSSVN] r73260  grassaddons/grass7/raster/r.stream.stats
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 4 19:24:39 PDT 2018
Author: wenzeslaus
Date: 20180904 19:24:38 0700 (Tue, 04 Sep 2018)
New Revision: 73260
Modified:
grassaddons/grass7/raster/r.stream.stats/r.stream.stats.html
Log:
r.stream.stats: refs sec and minor improvements
Modified: grassaddons/grass7/raster/r.stream.stats/r.stream.stats.html
===================================================================
 grassaddons/grass7/raster/r.stream.stats/r.stream.stats.html 20180904 18:58:04 UTC (rev 73259)
+++ grassaddons/grass7/raster/r.stream.stats/r.stream.stats.html 20180905 02:24:38 UTC (rev 73260)
@@ 53,8 +53,9 @@
<h3>OUTPUTS</h3>
Output statistics are send to standard output. To redirect output to
file use redirection operators: <tt><</tt> or <tt><<</tt>
+Output statistics are send to standard output or to a file if specified
+using the <b>output</b> option. Aletrnatively, to redirect output to
+a file use redirection operators: <tt>></tt> or <tt>>></tt>
(Unix only). If redirection is used, output messages are printed on
stderr (usually terminal) while statistics are written to the file.
Statistics can be print as a formatted summary information with number
@@ 64,13 +65,14 @@
<h2>NOTES</h2>
These statistics are calculated according to formulas given by
R.Horton (1945). Because Horton do not defined precisely what is
stream slope, 2 different approaches have been proposed: the first
(slope) uses cellbycell slope calculation; the second (gradient)
+R. Horton (1945). Horton didn't define precisely what is
+stream slope, consequently 2 different approaches have been proposed.
+The first (slope) uses cellbycell slope calculation.
+The second (gradient)
uses the difference between elevation of outlet and source of every
channel to its length to calculate formula. Bifurcation ratio for
every order is calculated acording to the formula:
<tt>n_streams[1]/n_stream[i+1]</tt> where i is the current order
+<tt>n_streams[1]/n_stream[i+1]</tt> where <tt>i</tt> is the current order
and <tt>i+1</tt> is the next higher order. For max order of the cell
value of streams is zero. Rest of the ratios are calculated in similar
mode. The bifurcation and other ratios for the whole catchment (map)
@@ 136,8 +138,8 @@
following <em><a href="r.mapcalc.html">r.mapcalc</a></em> formula:
<div class="code"><pre>
#xxx category of desired basin
r.mapcalc "sel_streams = if(basin==xxx,streams,null())"
+# xxx denotes the category of desired basin
+r.mapcalc "sel_streams = if(basin == xxx, streams, null())"
</pre></div>
<p>
@@ 144,14 +146,14 @@
It is also possible to calculate Horton's statistics for Shreve
ordering but it has no hydrological sense. Hack (or Gravelius
hierarchy) main stream is not the same what so called Horton's reverse
ordering (see: Horton 1945).
+ordering (see Horton 1945).
<p>
The module can work only if <b>direction</b> raster
map, <b>stream_rast</b> map and region have the same settings. It is
also required that stream_rast map and direction map come from the
+also required that <b>stream_rast</b> map and direction map come from the
same source. For lots of reason this limitation probably cannot be
omitted. This means that if stream_rast map comes from
+omitted. This means that if <b>stream_rast</b> map comes from
<em><a href="r.stream.extract.html">r.stream.extract</a></em> also
direction map
from <em><a href="r.stream.extract.html">r.stream.extract</a></em>
@@ 161,7 +163,8 @@
<h2>EXAMPLE</h2>
Create table with order statistics. This table can easily be sent to
external program (like R) to be visualised:
+external program (like R) to be visualized (assuming a unixlike command
+line):
<div class="code"><pre>
g.region p a raster=elevation
@@ 171,15 +174,24 @@
r.stream.stats o stream_rast=horton direction=direction elevation=elevation > tmp_file
R
r=read.csv("tmp_file",skip=1,header=TRUE)
plot(num_of_streams~order,data=r,log="y",
 main="Sperafish area",
 sub=paste("Bifurcation ratio: ",
 round(1/10^model$coefficients[2],3)))
model=lm(log10(num_of_streams)~order,data=r)
+# now in R
+r=read.csv("tmp_file", skip=1, header=TRUE)
+plot(num_of_streams~order, data=r, log="y",
+ main="Sperafish area",
+ sub=paste("Bifurcation ratio: ",
+ round(1/10^model$coefficients[2], 3)))
+model=lm(log10(num_of_streams)~order, data=r)
abline(model)
</pre></div>
+<h2>REFERENCES</h2>
+
+<ul>
+<li>Horton, R. E. (1945), <i>Erosional development of streams and their drainage
+basins: hydrophysical approach to quantitative morphology</i>, Geological
+Society of America Bulletin 56 (3): 275370
+</ul>
+
<h2>SEE ALSO</h2>
<em>
@@ 204,4 +216,3 @@
<p>
<i>Last changed: $Date$</i>

More information about the grasscommit
mailing list