DrainDir

Corrects the D8 drainage directions with path-based methods, which choose among the possible directions the one that keeps the flow path closest to the direction of steepest descent, accumulating the deviations along the path. It also computes the total contributing area of each cell: the number of cells draining into it, itself included, the input of ExtractNetwork.

Parameters

Corrects the D8 drainage directions so that the flow paths deviate as little as possible from the real direction of steepest descent, with the LAD (least angular deviation) or LTD (least transversal deviation) method, and calculates the total contributing area of each cell.

Toolbox folder: Geomorphology
Status: Certified
Keywords: Geomorphology, Drainage directions, Total contributing area, LAD, LTD
Authors: Andrea Antonello, Franceschi Silvia, Erica Ghesla, Rigon Riccardo
Class: org.hortonmachine.modules.DrainDir

Inputs

Parameter

Type

Unit

Default

Description

inPit

raster file

The depitted elevation model.

inFlow

raster file

The map of the D8 drainage directions.

inFlownet

raster file

The map of flowdirections on the network pixels (considered only in case of LTD method). Remember that in the case of fixed flow calculation the tca has to be recalculated afterwards; the tca output in this case is not corrected.

pLambda

float

1.0

The weight of the deviations accumulated along the upstream path, between 0 and 1: 0 considers only the local deviation, as the D8 method, 1 the deviation of the whole path.

doLad

boolean

true

If true the LAD method (least angular deviation) is used, else the LTD method (least transversal deviation).

Outputs

Parameter

Type

Unit

Description

outFlow

output file

The map of the corrected drainage directions.

outTca

output file

The map of the total contributing areas, as number of cells.

References

  • Orlandini, S., Moretti, G., Franchini, M., Aldighieri, B., Testa, B. (2003). Path-based methods for the determination of nondispersive drainage directions in grid-based digital elevation models. Water Resources Research, 39(6), 1144.

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.DrainDir

// the folder with the elevation model: change it to yours
var folder = "/data/flanginec/"

var drainDir = new DrainDir()
drainDir.inPit = folder + "pit.tif"
drainDir.inFlow = folder + "flow.tif"
drainDir.outFlow = folder + "drain.tif"
drainDir.outTca = folder + "tca.tif"
drainDir.process()
The drainage directions of the sample area, corrected by DrainDir.

The drainage directions of the sample area, corrected by DrainDir: compared with the ones of FlowDirections, the long straight bands of the same direction are broken into the directions that follow the steepest descent along the paths.

The total contributing area of the sample area, in cells.

The total contributing area of the sample area, in cells: the network emerges as the cells that drain the largest areas.