SplitSubbasins

Splits a basin into the subbasins of its streams, up to a Hack order: with order 2, the main stream (order 1) and the streams flowing into it (order 2) get each their subbasin, numbered, and so does their network. The streams of higher order are part of the subbasin of the stream they flow into.

The Hack orders come from NetworkAttributesBuilder.

Parameters

Splits a basin into the subbasins of the streams up to a Hack order: with order 2, the subbasins of the streams of order 1 and 2, and their network, are extracted and numbered.

Toolbox folder: Dem Manipulation
Status: Experimental
Keywords: Subbasins, Hack order, Network
Authors: Antonello Andrea, Franceschi Silvia, Rigon Riccardo, Erica Ghesla
Class: org.hortonmachine.modules.SplitSubbasins

Inputs

Parameter

Type

Unit

Default

Description

inFlow

raster file

The map of the drainage directions.

inHack

raster file

The map of the Hack orders of the network, as computed by the NetworkAttributesBuilder module.

pHackorder

Double

The highest Hack order of the streams whose subbasins are extracted.

Outputs

Parameter

Type

Unit

Description

outNetnum

output file

The map of the numbered network.

outSubbasins

output file

The map of the subbasins, with the number of their stream.

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

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

var split = new SplitSubbasins()
split.inFlow = folder + "drain_marked.tif"
// the Hack orders of NetworkAttributesBuilder
split.inHack = folder + "hack.tif"
split.pHackorder = 2
split.outNetnum = folder + "split_net.tif"
split.outSubbasins = folder + "split_subbasins.tif"
split.process()
The subbasins of the streams up to Hack order 2 of the basin of ExtractBasin.

The subbasins of the streams up to Hack order 2 of the basin of ExtractBasin.