1gdal_contour(1)             General Commands Manual            gdal_contour(1)
2
3
4

NAME

6       gdal_contourBuilds vector contour lines from a raster elevation model.
7

SYNOPSIS

9       Usage: gdal_contour [-b <band>] [-a <attribute_name>] [-amin <attribute_name>] [-amax <attribute_name>]
10                           [-3d] [-inodata]
11                           [-snodata n] [-i <interval>]
12                           [-f <formatname>] [[-dsco NAME=VALUE] ...] [[-lco NAME=VALUE] ...]
13                           [-off <offset>] [-fl <level> <level>...] [-e <exp_base>]
14                           [-nln <outlayername>] [-p]
15                           <src_filename> <dst_filename>
16

DESCRIPTION

18       This program generates a vector contour file from the input raster
19       elevation model (DEM).
20
21       Starting from version 1.7 the contour line-strings will be oriented
22       consistently. The high side will be on the right, i.e. a line string
23       goes clockwise around a top.
24
25       -b band:
26           picks a particular band to get the DEM from. Defaults to band 1.
27
28       -a name:
29           provides a name for the attribute in which to put the elevation. If
30           not provided no elevation attribute is attached. Ignored in
31           polygonal contouring (-p) mode.
32
33       -amin name:
34           (Since GDAL 2.4) provides a name for the attribute in which to put
35           the minimum elevation of contour polygon. If not provided no
36           minimum elevation attribute is attached. Ignored in default line
37           contouring mode.
38
39       -amax name:
40           (Since GDAL 2.4) provides a name for the attribute in which to put
41           the maximum elevation of contour polygon. If not provided no
42           maximim elevation attribute is attached. Ignored in default line
43           contouring mode.
44
45       -3d:
46           Force production of 3D vectors instead of 2D. Includes elevation at
47           every vertex.
48
49       -inodata:
50           Ignore any nodata value implied in the dataset - treat all values
51           as valid.
52
53       -snodata value:
54           Input pixel value to treat as 'nodata'.
55
56       -f format:
57           Create output in a particular format. Starting with GDAL 2.3, if
58           not specified, the format is guessed from the extension (previously
59           was ESRI Shapefile).
60
61       -dsco NAME=VALUE:
62           Dataset creation option (format specific)
63
64       -lco NAME=VALUE:
65           Layer creation option (format specific)
66
67       -i interval:
68           elevation interval between contours.
69
70       -off offset:
71           Offset from zero relative to which to interpret intervals.
72
73       -fl level:
74           Name one or more 'fixed levels' to extract.
75
76       -e base:
77           (Since GDAL 2.4) will generate levels on an exponential scale: base
78           ^ k, for k an integer.
79
80       -nln outlayername:
81           Provide a name for the output vector layer. Defaults to 'contour'.
82
83       -p:
84           (Since GDAL 2.4) Generate contour polygons rather than contour
85           lines.
86

C API

88       Functionality of this utility can be done from C with
89       GDALContourGenerate().
90

EXAMPLE

92       This would create 10meter contours from the DEM data in dem.tif and
93       produce a shapefile in contour.shp/shx/dbf with the contour elevations
94       in the 'elev' attribute.
95
96       gdal_contour -a elev dem.tif contour.shp -i 10.0
97

AUTHORS

99       Frank Warmerdam warmerdam@pobox.com, Silke Reimer silke@intevation.de
100
101
102
103GDAL                            Tue Mar 3 2020                 gdal_contour(1)
Impressum