Carver

Carves lines and polygons into an elevation model: the cells they cover are lowered by a depth, given for each feature in a field or as a single value. It is the opposite of BobTheBuilder, and it is used to:

  • burn the known rivers into the terrain, so that the flow directions follow them also where the elevation model misses them, as in flat valley floors, under bridges or along embankments;

  • model excavations, as a channel, a basin or a quarry.

The depth is subtracted from the elevation of each cell, so the bottom of a carved channel keeps the slope of the terrain, a few meters lower: it is not leveled. Where a polygon and a line overlap, the depth of the polygon is used.

Details

The lines and the polygons are rasterized on the grid of the elevation model, and the cells they cover are lowered by their depth, from a field of the vector or a single value. The other cells are not changed. Where a polygon and a line overlap, the depth of the polygon is used.

The depth is the same for the whole feature: the bottom of a carved channel follows the terrain, lowered by the depth, it is not leveled.

Parameters

Carves lines and polygons into an elevation model, lowering the cells they cover by a depth: as rivers burned into the terrain, so that the flow follows them, or excavations.

Toolbox folder: Raster Processing
Status: Experimental
Keywords: Carve, Raster
Authors: Andrea Antonello
Class: org.hortonmachine.modules.Carver

Inputs

Parameter

Type

Unit

Default

Description

inRaster

raster file

The elevation model to carve.

inCarverPolygons

vector file

The optional polygons to carve. At least the lines or the polygons are needed.

inCarverLines

vector file

The optional lines to carve. At least the lines or the polygons are needed.

fDepthLines

String

The optional field of the lines with their depth.

pDepthLines

double

m

6.0

The depth of the lines, used if no field is given.

fDepthPolygons

String

The optional field of the polygons with their depth.

pDepthPolygons

double

m

6.0

The depth of the polygons, used if no field is given.

Outputs

Parameter

Type

Unit

Description

outRaster

output file

The carved 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. It burns the network of the basin, extracted by NetworkAttributesBuilder, 3 m into the terrain:

import org.hortonmachine.modules.Carver

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

// burn the channels of the network of NetworkAttributesBuilder 3 m into the terrain
var carver = new Carver()
carver.inRaster = folder + "dtm_flanginec.tif"
carver.inCarverLines = folder + "net_attributes.shp"
carver.pDepthLines = 3.0
carver.outRaster = folder + "dtm_carved.tif"
carver.process()
The difference between the original and the carved elevation model: the cells of the channels of the basin, lowered by 3 m.

The difference between the original and the carved elevation model: the cells of the channels of the basin, lowered by 3 m.