Contour
Lines joining cells of equal value in a raster, at a regular interval.
Pitfall. Contours are interpolated between cell centres, so they are only as precise as the cell size; engines differ on whether lines stop at the outermost cell centres (GRASS) or run to the raster's edge (GDAL).
Pitfall. Some engines smooth or simplify the lines by default, which changes their lengths and positions slightly.
| Also called | contours, contour lines, isolines, Contour List |
|---|---|
| Group | raster/surface |
| Checks | raster.nodata, geometry.valid |
| Pitfalls | 2 listed above |
| Columbus tool | Not stated |
| Notes | Not stated |
| Status | active |
| Broader | Not stated |
| Narrower | Not stated |
| Related |
Parameters
| Name | Type | Required | Default | Values | Note |
|---|---|---|---|---|---|
interval | number | yes | Not stated | Not stated | Spacing between levels, in the raster's value units. |
base | number | no | 0 | Not stated | Levels are base plus multiples of interval. |
field | string | no | Not stated | Not stated | Name of the attribute that holds each line's level. |
band | integer | no | 1 | Not stated | Not stated |
Inputs and outputs
| Direction | Name | Type | Geometry | Note |
|---|---|---|---|---|
| Input | raster | raster | Not stated | Not stated |
| Output | output | vector | line | Not stated |
In each engine
| Engine | Tool | Parameters | Differences |
|---|---|---|---|
gdal | gdal raster contour |
| None noted |
grass | r.contour |
| None noted |
postgis-raster | st_contour |
| None noted |
qgis | gdal:contour |
| None noted |
terra | terra::as.contour |
|
|
whiteboxtools | ContoursFromRaster |
|
|
xarray-spatial | xrspatial.contours |
|
|