NetworkAttributesBuilder¶
NetworkAttributesBuilder converts the raster network into a vector of its links, the stretches of channel between two confluences, with their attributes:
the Hack order: 1 for the main stream, from the outlet to the source draining the largest area, 2 for the streams flowing into it, and so on;
the Strahler order (Strahler, 1957): 1 for the first links, increasing by one where two links of the same order meet;
the Pfafstetter code (Verdin and Verdin, 1999), which numbers the basins and the streams hierarchically;
with the elevation, the elevation of the start and end of each link.
It can also write the map of the Hack orders, the input of SplitSubbasins. The drainage directions must have the outlet marked with the value 10, for example with MarkOutlets.
Parameters¶
Converts a raster network into a vector of its links, with their attributes: the Hack order, the Strahler order and the Pfafstetter code, and with the elevation also the elevation of their start and end. It can also write the map of the Hack orders.
Toolbox folder: Network
Status: Certified
Keywords: Network, Vector, Hack order, Strahler order, Pfafstetter
Authors: Andrea Antonello
Class: org.hortonmachine.modules.NetworkAttributesBuilder
Inputs
Parameter |
Type |
Unit |
Default |
Description |
|---|---|---|---|---|
|
raster file |
The map of the network. |
||
|
raster file |
The map of the drainage directions, with the outlets marked with 10. |
||
|
raster file |
cells |
The map of the total contributing area. |
|
|
boolean |
|
Also write the map of the Hack orders. |
Outputs
Parameter |
Type |
Unit |
Description |
|---|---|---|---|
|
output file |
The vector of the network links, with their attributes. |
|
|
output file |
The map of the Hack orders of the network. |
References
Strahler, A. N. (1957). Quantitative analysis of watershed geomorphology. Transactions, American Geophysical Union, 38(6), 913-920.
Verdin, K. L., Verdin, J. P. (1999). A topological system for delineation and codification of the Earth’s river basins. Journal of Hydrology, 218(1-2), 1-12.
Example¶
The example runs on the sample elevation model of the manual, dtm_flanginec.tif in docs/manual/modules/maps/data, each module on the outputs of the previous ones:
import org.hortonmachine.modules.NetworkAttributesBuilder
// the folder with the elevation model: change it to yours
var folder = "/data/flanginec/"
var attributes = new NetworkAttributesBuilder()
// the network and the drainage directions of the basin of ExtractBasin, with the outlet marked
attributes.inNet = folder + "net_basin.tif"
attributes.inFlow = folder + "drain_marked.tif"
attributes.inTca = folder + "tca.tif"
attributes.doHack = true
attributes.outNet = folder + "net_attributes.shp"
attributes.outHack = folder + "hack.tif"
attributes.process()
The vector of the network of the basin of ExtractBasin, colored by the Hack order of the links: 1 is the main stream.¶
The same network colored by the Strahler order of the links: the order grows by one where two links of the same order meet.¶