This tool can be used to assign the Horton-Strahler stream order to each link in a stream network. According to this common stream numbering system, headwater stream links are assigned an order of one. Stream order only increases downstream when two links of equal order join, otherwise the downstream link is assigned the larger of the two link orders. Stream order is often used in hydro-geomorphic and ecological studies to quantify the relative size and importance of a stream segment to the overall river system. Shreve's stream magnitude is an alternative stream numbering scheme.
The user must specify the names of a streams raster image and D8 pointer image. Stream cells are designated in the streams image as all positive, nonzero values. Thus all non-stream or background grid cells are commonly assigned either zeros or NoData values. The pointer image is used to traverse the stream network and should only be created using the D8 algorithm. Background cells will be assigned the NoData value in the output image. The output raster is of an integer data type and continuous data scale.
The following is an example of a Python script that uses this tool:
wd = pluginHost.getWorkingDirectory()
streamsFile = wd + "streams.dep"
pointerFile = wd + "D8 pointer.dep"
outputFile = wd + "output.dep"
args = [streamsFile, pointerFile, outputFile]
pluginHost.runPlugin("StreamOrder", args, False)
This is a Groovy script also using this tool:
def wd = pluginHost.getWorkingDirectory()
def streamsFile = wd + "streams.dep"
def pointerFile = wd + "D8 pointer.dep"
def outputFile = wd + "output.dep"
String args = [streamsFile, pointerFile, outputFile]
pluginHost.runPlugin("StreamOrder", args, false)