Pitfiller

Real terrain drains to the sea, but in a digital elevation model there are always cells lower than all their neighbours: errors of the data, effects of the resolution, or real closed depressions. From such cells the drainage directions can’t be defined, so the depressions are filled first. The depitted elevation model is the input of the drainage directions modules, like FlowDirections.

Details

All the depressions are filled, also the real closed ones, like lakes, ponds or karst sinks, which can’t be told apart from the errors of the data. The drainage directions computed afterwards cross them as if they were filled, so where real depressions matter the results have to be checked there.

Parameters

Fills the depressions (pits) of a digital elevation model, raising the cells that have no downhill neighbour, so that from every cell water can flow down to the border of the map. It is the first step of most hydro-geomorphological analyses.

Toolbox folder: Dem Manipulation
Status: Certified
Keywords: Dem manipulation, Geomorphology, Depressions, Pits
Authors: David Tarboton, Andrea Antonello
Class: org.hortonmachine.modules.Pitfiller

Inputs

Parameter

Type

Unit

Default

Description

inElev

raster file

The digital elevation model.

Outputs

Parameter

Type

Unit

Description

outPit

output file

The depitted elevation model.

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

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

var pitfiller = new Pitfiller()
pitfiller.inElev = folder + "dtm_flanginec.tif"
pitfiller.outPit = folder + "pit.tif"
pitfiller.process()
The depitted elevation of the sample area: the filled depressions are the flat patches.

The depitted elevation of the sample area: the filled depressions are the flat patches.