ContourExtractor

Extracts the contour lines of a raster, at regular intervals of its values between a minimum and a maximum, as a vector of lines with their value. With an elevation model they are the contours of the maps; with other rasters, the lines of equal value, as of equal precipitation or temperature.

Parameters

Extracts the contour lines of a raster, at regular intervals of its values, as a vector of lines.

Toolbox folder: Vector Processing
Status: Experimental
Keywords: Contours, Isolines, Raster, Vector
Authors: Andrea Antonello
Class: org.hortonmachine.modules.ContourExtractor

Inputs

Parameter

Type

Unit

Default

Description

inCoverage

raster file

The raster of which to extract the contours.

pMin

Double

The value of the lowest contour.

pMax

Double

The value of the highest contour.

pInterval

Double

The interval between the contours.

Outputs

Parameter

Type

Unit

Description

outGeodata

output file

The vector of the contour lines, with their value.

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

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

// a contour line every 100 m
var contours = new ContourExtractor()
contours.inCoverage = folder + "dtm_flanginec.tif"
contours.pMin = 900.0
contours.pMax = 2100.0
contours.pInterval = 100.0
contours.outGeodata = folder + "contours.shp"
contours.process()
The contour lines of the sample area, every 100 m.

The contour lines of the sample area, every 100 m.