HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

gdal_contour — Create contour lines and polygons from a digital elevation model. More information: <https://gdal.or

Submitted by: @import:tldr-pages··
0
Viewed 0 times
polygonscreatecommandcontourgdal_contourlinesandcli

Problem

How to use the gdal_contour command: Create contour lines and polygons from a digital elevation model. More information: <https://gdal.org/en/stable/programs/gdal_contour.html>.

Solution

gdal_contour — Create contour lines and polygons from a digital elevation model. More information: <https://gdal.org/en/stable/programs/gdal_contour.html>.

Create a vector dataset with contour lines spread over a 100-meter [i]nterval while [a]ttributing the elevation property as "ele":
gdal_contour -a {{ele}} -i {{100.0}} {{path/to/input.tif}} {{path/to/output.gpkg}}


Create a vector dataset with [p]olygons spread over a 100-meter [i]nterval:
gdal_contour -i {{100.0}} -p {{path/to/input.tif}} {{path/to/output.gpkg}}

Code Snippets

Create a vector dataset with contour lines spread over a 100-meter [i]nterval while [a]ttributing the elevation property as "ele"

gdal_contour -a {{ele}} -i {{100.0}} {{path/to/input.tif}} {{path/to/output.gpkg}}

Create a vector dataset with [p]olygons spread over a 100-meter [i]nterval

gdal_contour -i {{100.0}} -p {{path/to/input.tif}} {{path/to/output.gpkg}}

Context

tldr-pages: common/gdal_contour

Revisions (0)

No revisions yet.