r.stream.segment.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <h2>DESCRIPTION</h2>
  2. <h2>OPTIONS</h2>
  3. <dl>
  4. <dt><b>-r</b></dt>
  5. <dd>Directions and azimut output in radians. Default is degrees.</dd>
  6. <dt><b>-m</b></dt>
  7. <dd>Only for very large data sets. Use segment library to optimize memory
  8. consumption during analysis</dd>
  9. <dt><b>stream_rast</b></dt>
  10. <dd>Stream network: name of input stream map. Streams shall be ordered according
  11. one of the <em>r.stream.order</em> ordering system as well as unordered (with original
  12. stream identifiers) Because streams network produced by <em>r.watershed</em> and
  13. <em>r.stream.extract</em> may slightly differ in detail, it is required to use both stream
  14. and direction map produced by the same module. Stream background shall have NULL
  15. value or zero value. Background values of NULL are by default produced by
  16. <em>r.watershed</em> and <em>r.stream.extract</em>. If not 0 or NULL use <em><a
  17. href="r.mapcalc.html">r.mapcalc</a></em> to set background values to null.
  18. </dd>
  19. <dt><b>direction</b></dt>
  20. <dd>Flow direction: name of input direction map produced by <em>r.watershed</em> or
  21. <em>r.stream.extract</em>. If r.stream.extract output map is used, it only has non-NULL
  22. values in places where streams occur. NULL (nodata) cells are ignored, zero and
  23. negative values are valid direction data if they vary from -8 to 8 (CCW from
  24. East in steps of 45 degrees). Direction map shall be of type CELL values. Region
  25. resolution and map resolution must be the same.
  26. Also <em>stream_rast</em> network map must have the same resolution. It is checked by
  27. default. If resolutions differ the module informs about it and stops. Region
  28. boundary and maps boundary may be differ but it may lead to unexpected
  29. results.</dd>
  30. <dt><b>elevation</b></dt>
  31. <dd>Elevation: name of input elevation map. Map can be of type CELL, FCELL or
  32. DCELL. It is not restricted to resolution of region settings as stream_rast and
  33. direction.</dd>
  34. <dt><b>length</b></dt>
  35. <dd>Integer values indicating the search length (in cells) to determine straight
  36. line. The longest length parameter the module treats more tolerant local stream
  37. undulation and inequalities. Default value of 15 is suitable for 30 meters
  38. DEMs. More detail DEMs may requre longer length.</dd>
  39. <dt><b>skip</b></dt>
  40. <dd>Integer values indicating the length (in cells) local short segment to skip
  41. and join them to the longer neighbour. The shortest length parameter the more
  42. short segments will be produced by the module due to undulation and
  43. inequalities. Default value of 5 is suitable for 30 meters DEMS. More details
  44. DEMS may require longer length.</dd>
  45. <dt><b>threshold</b></dt>
  46. <dd>real value indicates the internal angle between upstream and downstream
  47. direction to treat actual cell as lying on the straight line. Greater values (up to
  48. 180 degrees) produce more segments. Lower values produce less segments.
  49. Values below 90 in most cases will not produce any additional segments to those
  50. resulting from ordering.</dl>
  51. <dl>
  52. <h2>OUTPUTS</h2>
  53. <p>The module produces two vector maps: one representing original segments
  54. (where a segment is a streamline where its order remains unchanged) and the second
  55. divided into near straight line sectors resulting form segmentation process.
  56. Most of the segment and sectors attributes are the same as in <em>r.stream.order</em> vector
  57. output.</p>
  58. <dl>
  59. <dt><b>segments</b></dt>
  60. <dd>
  61. Vector map where every segment has its own category and following attributes:
  62. <ul>
  63. <li><b>segment</b>: integer, segment identifier
  64. <li><b>next_segment</b>: integer, topological next segment identifier
  65. <li><b>s_order</b>: integer, segment order
  66. <li><b>next_order</b>: integer, topological next segment order
  67. <li><b>direction</b>: double precision, full segment direction (0-360)
  68. <li><b>azimuth</b>: double precision, full segment azimuth (0-180)
  69. <li><b>length</b>: double precision, segment length
  70. <li><b>straight</b>: double precision, length of straight line between segment
  71. nodes
  72. <li><b>sinusoid</b>: double precision, sinusoid (length/straight)
  73. <li><b>elev_min</b>: double precision, minimum elevation (elevation at segment
  74. start)
  75. <li><b>elev_max</b>: double precision, maximum elevation (elevation at segment
  76. end)
  77. <li><b>s_drop</b>: double precision, difference between start and end of the
  78. segment
  79. <li><b>gradient</b>: double precision, drop/length
  80. <li><b>out_direction</b>: double precision, direction (0-360) of segment end
  81. sector
  82. <li><b>out_azimuth</b>: double precision, azimuth (0-180) of segment end sector
  83. <li><b>out_length</b>: double precision, length of segment end sector
  84. <li><b>out_drop</b>: double precision, drop of segment end sector
  85. <li><b>out_gradient</b>: double precision, gradient of segment end sector
  86. <li><b>tangent_dir</b>: double precision, direction of tangent in segment outlet
  87. to the next stream
  88. <li><b>tangent_azimuth</b>: double precision, azimuth of tangent in segment
  89. outlet to the next stream
  90. <li><b>next_direction</b>: double precision, direction of next stream in join
  91. with current segment
  92. <li><b>next_azimuth</b>: double precision, azimuth of next stream in join with
  93. current segment
  94. </ul>
  95. <img src="dirs.png">
  96. </dd>
  97. <dt><b>sectors</b></dt>
  98. <dd>Vector map where every sector has its own category and following attributes:
  99. <ul>
  100. <li><b>sector</b>: integer, sector category
  101. <li><b>segment</b>: integer, segment category (to establish relationship)
  102. <li><b>s_order</b>: integer, segment order
  103. <li><b>direction</b>: double precision, sector direction
  104. <li><b>azimuth</b>: double precision, sector azimuth
  105. <li><b>length</b>: double precision, sector length
  106. <li><b>straight</b>: double precision, length of straight line between sector
  107. nodes
  108. <li><b>sinusoid</b>: double precision, sinusoid (length/straight)
  109. <li><b>elev_min</b>: double precision, minimum elevation (elevation at sector
  110. start)
  111. <li><b>elev_max</b>: double precision, minimum elevation (elevation at sector
  112. end)
  113. <li><b>s_drop</b>: double precision, difference between start and end of the
  114. sector
  115. <li><b>gradient</b>: double precision, drop/length
  116. </ul>
  117. <img src="sectors.png">
  118. Relation between segments and sector may be set up by segment key.
  119. </dd>
  120. </dl>
  121. <p>
  122. The main idea comes from works of Horton (1932) and Howard (1971, 1990). The
  123. module is designed to investigate network lineaments and calculate angle
  124. relations between tributaries and its major streams. The main problem in
  125. calculating directional parameters is that streams usually are not straight
  126. lines. Therefore as the first step of the procedure, partitioning of streams
  127. into near-straight-line segments is required.
  128. <p>
  129. The segmentation process uses a method similar to the one used by Van & Ventura
  130. (1997) to detect corners and partition curves into straight lines and gentle
  131. arcs. Because it is almost impossible to determine exactly straight sections
  132. without creating numerous very short segments, the division process requires
  133. some approximation. The approximation is made based on three parameters: (1) the
  134. downstream/upstream search length, (2) the short segment skipping threshold, and
  135. (3) the maximum angle between downstream/upstream segments to be considered as a
  136. straight line. In order to designate straight sections of the streams, the
  137. algorithm is searching for those points where curves significantly change their
  138. direction.
  139. The definition of stream segments depends on the ordering method selected by the
  140. user, Strahler's, Horton's or Hack's main stream, or the network may remain
  141. unordered. All junctions of streams to streams of higher order are always split
  142. points, but for ordered networks, streams of higher order may be divided into
  143. sections which ignore junctions with streams of lower order. In unordered
  144. networks all junctions are always split points.
  145. In extended mode the module also calculates the direction of a stream to its
  146. higher order stream. If the higher order stream begins at the junction with the
  147. current stream (Strahler's ordering only) or if the network is unordered, the
  148. direction is calculated as the direction of the line between junction point and
  149. downstream point (Howard 1971) within the user-defined global search distance.
  150. If a higher order stream continues at the junction, its direction is calculated
  151. as the direction of the tangent line to the stream of higher order at the
  152. junction point. To avoid local fluctuation, the tangent line is approximated as
  153. a secant line joining downstream/upstream points at a distance globally defined
  154. by the search length parameter (1). Such a definition of the angle between
  155. streams is not fully compatible with Horton's original criterion.
  156. <h2>NOTES</h2>
  157. <p>
  158. The module can work only if direction map, stream_rast map and region have the same
  159. settings. It is also required that stream_rast map and direction map come from the
  160. same source. For lots of reason this limitation probably cannot be omitted.
  161. This means that if stream_rast map comes from <em>r.stream.extract</em>, also direction map from
  162. <em>r.stream.extract</em> must be used. If stream_rast network was generated with MFD method,
  163. also MFD direction map must be used.
  164. <h2>EXAMPLE</h2>
  165. <div class="code"><pre>
  166. g.region -p -a rast=elevation
  167. r.watershed elevation=elevation threshold=10000 drainage=direction stream=streams
  168. r.stream.order stream_vect=streams direction=direction strahler=riverorder_strahler
  169. r.stream.segment stream_rast=riverorder_strahler direction=direction \
  170. elevation=elevation segments=river_segment sectors=river_sector
  171. </pre></div>
  172. <h2>REFERENCES</h2>
  173. <p>Horton, R. E., (1932). Drainage basin characteristics: Am. Geophys. Union
  174. Trans., (3), 350-361.
  175. <p>Howard, A.D. (1971). Optimal angles of stream junction: Geometric, Stability
  176. to capture and Minimum Power Criteria, Water Resour. Res. 7(4), 863-873.
  177. <p>Howard, A.D. (1990). Theoretical model of optimal drainage networks Water
  178. Resour. Res., 26(9), 2107-2117.
  179. <p>Van, W., Ventura, J.A. (1997). Segmentation of Planar Curves into
  180. Straight-Line Segments and Elliptical Arcs, Graphical Models and Image
  181. Processing 59(6), 484-494.
  182. <h2>SEE ALSO</h2>
  183. <em>
  184. <a href="r.mapcalc.html">r.mapcalc</a>,
  185. <a href="r.stream.channel.html">r.stream.channel</a>,
  186. <a href="r.stream.distance.html">r.stream.distance</a>,
  187. <a href="r.stream.extract.html">r.stream.extract</a>,
  188. <a href="r.stream.order.html">r.stream.order</a>,
  189. <a href="r.stream.slope.html">r.stream.slope</a>,
  190. <a href="r.stream.snap.html">r.stream.snap</a>,
  191. <a href="r.stream.stats.html">r.stream.stats</a>,
  192. <a href="r.watershed.html">r.watershed</a>
  193. </em>
  194. <p>
  195. See
  196. also <a href="http://grasswiki.osgeo.org/wiki/R.stream.*_modules">r.streams.*
  197. modules</a> wiki page.
  198. <h2>AUTHOR</h2>
  199. Jarek Jasiewicz, Adam Mickiewicz University, Geoecology and Geoinformation
  200. Institute.
  201. <p>
  202. <i>Last changed: $Date$</i>