Wateroutlet

Extracts the basin of an outlet: the cells that drain into it along the drainage directions. It is the port of the r.water.outlet module of GRASS GIS.

The outlet must be on the cell where the water really passes, usually a cell of the network: a point next to the channel gives the tiny basin of a hillslope. ExtractBasin does the same, and can also snap the outlet to a network, smooth the basin and write it as a vector.

Parameters

Extracts the basin of an outlet: the cells that drain into it along the drainage directions. Ported from the r.water.outlet module of GRASS GIS.

Toolbox folder: Dem Manipulation
Status: Certified
Keywords: Basin, Outlet, Drainage directions
Authors: Charles Ehlschlaeger, Andrea Antonello
Class: org.hortonmachine.modules.Wateroutlet

Inputs

Parameter

Type

Unit

Default

Description

pNorth

double

-1.0

The northing of the outlet, in the coordinates of the map.

pEast

double

-1.0

The easting of the outlet, in the coordinates of the map.

inFlow

raster file

The map of the drainage directions.

Outputs

Parameter

Type

Unit

Description

outBasin

output file

The map of the basin: 1 inside, no-data outside.

outArea

double

m²

The area of the basin.

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

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

var wateroutlet = new Wateroutlet()
wateroutlet.inFlow = folder + "drain.tif"
// the outlet, on the network
wateroutlet.pEast = 1639885.0
wateroutlet.pNorth = 5110955.0
wateroutlet.outBasin = folder + "outlet_basin.tif"
wateroutlet.process()
println "Basin area: " + wateroutlet.outArea + " m2"
The basin of an outlet in the southeast of the sample area: 1.4 km².

The basin of an outlet in the southeast of the sample area: 1.4 km².