HackLength¶
The Hack length of a cell is the length of the main stream upstream of it, from its source: going upstream, at each confluence the main stream is the branch that drains the largest area. Hack (1957) found that in a basin the length of the main stream grows as a power of the contributing area, L ∝ Ah, with h about 0.6, a law that holds in basins of any size.
The lengths are measured along the drainage directions, also in 3D with the elevation. The outlet must be marked with the value 10, for example with MarkOutlets.
Parameters¶
Calculates the Hack length of each cell: the length of the main stream upstream of it, from its source, following at each confluence the branch with the largest contributing area. Hack’s law relates it to the contributing area.
Toolbox folder: Network
Status: Certified
Keywords: Network, Hack length, Main stream, Geomorphology
Authors: Antonello Andrea, Franceschi Silvia, Daniele Andreis, Erica Ghesla, Cozzini Andrea, Pisoni Silvano, Rigon Riccardo
Class: org.hortonmachine.modules.HackLength
Inputs
Parameter |
Type |
Unit |
Default |
Description |
|---|---|---|---|---|
|
raster file |
The map of the drainage directions. |
||
|
raster file |
cells |
The map of the total contributing area, to choose the main branch at the confluences. |
|
|
raster file |
m |
The optional map of the elevation, to measure the lengths in 3D. |
Outputs
Parameter |
Type |
Unit |
Description |
|---|---|---|---|
|
output file |
m |
The map of the Hack lengths. |
References
Hack, J. T. (1957). Studies of longitudinal stream profiles in Virginia and Maryland. U.S. Geological Survey Professional Paper 294-B, 45-97.
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.HackLength
// the folder with the elevation model: change it to yours
var folder = "/data/flanginec/"
var hackLength = new HackLength()
hackLength.inFlow = folder + "drain_marked.tif"
hackLength.inTca = folder + "tca.tif"
hackLength.outHacklength = folder + "hacklength.tif"
hackLength.process()
The Hack length of the basin of ExtractBasin, in meters: it grows along the main streams, up to the length of the longest path at the outlet.¶