gdal_contour
generates contour lines from elevation data
TLDR
Generate contours
$ gdal_contour -a [elev] -i [10] [dem.tif] [contours.shp]
Specify interval$ gdal_contour -i [100] [dem.tif] [contours.shp]
Fixed contour levels$ gdal_contour -fl [100] [500] [1000] [dem.tif] [contours.shp]
Output to GeoJSON$ gdal_contour -f "GeoJSON" -i [10] [dem.tif] [contours.geojson]
SYNOPSIS
gdal_contour [options] input output
DESCRIPTION
gdal_contour generates contour lines from elevation rasters (DEMs). It creates vector features representing lines of equal elevation.
The tool supports regular interval or specified level contours. Output includes elevation attributes for labeling. Multiple output formats are available.
gdal_contour is used for cartography, terrain analysis, and visualization of elevation data.
PARAMETERS
INPUT
Input elevation raster (DEM).OUTPUT
Output vector file.-a NAME
Attribute name for elevation.-i INTERVAL
Contour interval.-fl LEVELS
Fixed contour levels.-f FORMAT
Output format.-b BAND
Source band number.--help
Display help information.
CAVEATS
Quality depends on DEM resolution. Dense contours may be slow. Output size varies with complexity.
HISTORY
gdal_contour is part of GDAL (Geospatial Data Abstraction Library), providing contour generation from digital elevation models for mapping and analysis.
