GDAL_CONTOUR(1) GDAL GDAL_CONTOUR(1) (NAME) gdal_contour - (SYNOPSIS) gdal_contour [--help] [--help-general] [-b ] [-a ] [-amin ] [-amax ] [-3d] [-inodata] [-snodata ] [-f ] [-i ] [-dsco =]... [-lco =]... [-off ] [-fl ...] [-e ] [-nln ] [-q] [-p] [-gt |unlimited] (DESCRIPTION) gdal_contour (DEM) . (line-strings) . : "gdal": gdal raster contour . --help --help-general GDAL . -q, --quiet . -b DEM . 1 . -a () . . (-p) . -amin . . . -amax . . . -3d . (vertices). -inodata (nodata) - . -snodata . -snodata "nodata" . -inodata . -f . ( ESRI Shapefile ). -dsco = ( ) -lco = ( ) -i ( ). -i -fl -e . interval . -off () . -i 100 ... - ... . -off 25 ... - ... . -fl " " ( ) . -e : base ^ k k. -i -fl -e . -nln . "contour" . -p () . -i -fl -e -fl . MIN MAX ( ) . -gt n ( 100 000). DBMS . n unlimited . 0 . 3.10 . (RETURN STATUS CODE) 0 ( ). C (C API) C GDALContourGenerate() . (EXAMPLES) DEM gdal_contour -a elev dem.tif contour.shp -i 10.0 DEM dem.tif shapefile contour.shp|shx|dbf elev . DEM $ cat test.asc ncols 2 nrows 2 xllcorner 0 yllcorner 0 cellsize 1 4 15 25 36 $ gdal_contour test.asc -f GeoJSON /vsistdout/ -i 10 -p -amin min -amax max DEM test.asc GeoJSON min max . { "type": "FeatureCollection", "name": "contour", "features": [ { "type": "Feature", "properties": { "ID": 0, "min": 4.0, "max": 10.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 0.5, 1.214285714285714 ], [ 1.045454545454545, 1.5 ], [ 1.045454545454545, 2.0 ], [ 1.0, 2.0 ], [ 0.5, 2.0 ], [ 0.0, 2.0 ], [ 0.0, 1.5 ], [ 0.0, 1.214285714285714 ], [ 0.5, 1.214285714285714 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 1, "min": 10.0, "max": 20.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 1.5, 1.261904761904762 ], [ 2.0, 1.261904761904762 ], [ 2.0, 1.5 ], [ 2.0, 2.0 ], [ 1.5, 2.0 ], [ 1.045454545454545, 2.0 ], [ 1.045454545454545, 1.5 ], [ 0.5, 1.214285714285714 ], [ 0.0, 1.214285714285714 ], [ 0.0, 1.0 ], [ 0.0, 0.738095238095238 ], [ 0.5, 0.738095238095238 ], [ 1.5, 1.261904761904762 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 2, "min": 20.0, "max": 30.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 0.954545454545455, 0.0 ], [ 0.954545454545455, 0.5 ], [ 1.5, 0.785714285714286 ], [ 2.0, 0.785714285714286 ], [ 2.0, 1.0 ], [ 2.0, 1.261904761904762 ], [ 1.5, 1.261904761904762 ], [ 0.5, 0.738095238095238 ], [ 0.0, 0.738095238095238 ], [ 0.0, 0.5 ], [ 0.0, 0.0 ], [ 0.5, 0.0 ], [ 0.954545454545455, 0.0 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 3, "min": 30.0, "max": 36.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 1.499999909090926, 0.0 ], [ 1.0, 0.0 ], [ 0.954545454545455, 0.0 ], [ 0.954545454545455, 0.5 ], [ 1.5, 0.785714285714286 ], [ 2.0, 0.785714285714286 ], [ 2.0, 0.500000047619043 ], [ 1.5, 0.500000047619043 ], [ 1.499999909090926, 0.5 ], [ 1.499999909090926, 0.0 ] ] ] ] } } ] } DEM $ cat test.asc ncols 2 nrows 2 xllcorner 0 yllcorner 0 cellsize 1 4 15 25 36 $ gdal_contour test.asc -f GeoJSON /vsistdout/ -fl 10 20 -p -amin min -amax max DEM test.asc GeoJSON min max . MIN MAX ( ) : $ cat test.asc ncols 2 nrows 2 xllcorner 0 yllcorner 0 cellsize 1 4 15 25 36 $ gdal_contour test.asc -f GeoJSON /vsistdout/ -fl MIN 10 20 MAX -p -amin min -amax max DEM test.asc GeoJSON min max : (4.0, 10.0) (10, 20.0) (20.0, 36.0). DEM $ cat test.asc ncols 2 nrows 2 xllcorner 0 yllcorner 0 cellsize 1 4 15 25 36 $ gdal_contour test.asc -f GeoJSON /vsistdout/ -i 10 -fl 15 -p -amin min -amax max . min max : (4.0, 10.0) (10, 15.0) (15, 20.0) (20.0, 30.0) (30.0, 36.0). (AUTHORS) Frank Warmerdam , Silke Reimer (COPYRIGHT) 1998-2026 August 18, 2026 GDAL_CONTOUR(1)