PitfillerBarnes

PitfillerBarnes fills the depressions of the elevation model, as Pitfiller, with the Priority-Flood algorithm of Barnes (2016), which processes the map in tiles in parallel. It is much faster on large elevation models, and with the large file mode it works file to file, for maps that don’t fit in memory.

In the same run it can also compute the D8 drainage directions of the filled map, flats included, their total contributing areas and the network above a threshold: the first steps of a hydrological analysis, on maps too large for the single modules.

Parameters

Fills the depressions of a DEM using the parallel Priority-Flood algorithm by Barnes (2016).

Toolbox folder: Dem Manipulation
Status: Experimental
Keywords: Dem manipulation, Geomorphology, Pitfiller, Priority-Flood
Authors: Andrea Antonello
Class: org.hortonmachine.modules.PitfillerBarnes

Inputs

Parameter

Type

Unit

Default

Description

inElev

raster file

The map of digital elevation model (DEM). In large file mode it has to be a GeoTIFF.

doLargeFile

boolean

false

Process file to file, without loading the DEM in memory, for DEMs that do not fit in memory. The outputs are written as tiled GeoTIFFs (default is false).

pTileSize

int

1024

The size in cells of the side of the tiles processed in parallel, in large file mode also the tile size of the output, a multiple of 16 (default is 1024).

pThreads

int

number of processors

The number of threads to use (defaults to the number of available processors).

pThres

long

100

The threshold on the total contributing area, in cells, for the network extraction.

Outputs

Parameter

Type

Unit

Description

outPit

output file

The depitted elevation map.

outFlow

output file

The optional map of D8 flow directions of the depitted map, flats included (10 for outlets).

outTca

output file

The optional map of total contributing areas (in cells) of the flow directions. Integers when the number of valid cells allows it, else doubles.

outNet

output file

The optional map of the network extracted with the threshold on the total contributing area (network cells have value 2).

References

  • Barnes, R. (2016). Parallel priority-flood depression filling for trillion cell digital elevation models on desktops or clusters. Computers & Geosciences, 96, 56-68. doi:10.1016/j.cageo.2016.07.001

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

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

var pitfiller = new PitfillerBarnes()
pitfiller.inElev = folder + "dtm_flanginec.tif"
pitfiller.outPit = folder + "pit_barnes.tif"
// also the network of the cells draining at least 100 cells
pitfiller.pThres = 100
pitfiller.outNet = folder + "net_barnes.tif"
pitfiller.process()
The depitted elevation of the sample area, computed by PitfillerBarnes.

The depitted elevation of the sample area, computed by PitfillerBarnes.

The network extracted in the same run, with a threshold of 100 cells, on the D8 directions of the filled map.

The network extracted in the same run, with a threshold of 100 cells, on the D8 directions of the filled map.