1GDAL_CONTOUR(1) GDAL GDAL_CONTOUR(1)
2
3
4
6 gdal_contour - Builds vector contour lines from a raster elevation
7 model.
8
10 gdal_contour [-b <band>] [-a <attribute_name>] [-amin <attribute_name>] [-amax <attribute_name>]
11 [-3d] [-inodata]
12 [-snodata n] [-i <interval>]
13 [-f <formatname>] [[-dsco NAME=VALUE] ...] [[-lco NAME=VALUE] ...]
14 [-off <offset>] [-fl <level> <level>...] [-e <exp_base>]
15 [-nln <outlayername>] [-q] [-p]
16 <src_filename> <dst_filename>
17
19 The gdal_contour generates a vector contour file from the input raster
20 elevation model (DEM).
21
22 New in version 1.7.0: The contour line-strings are oriented consis‐
23 tently and the high side will be on the right, i.e. a line string goes
24 clockwise around a top.
25
26
27 -b <band>
28 Picks a particular band to get the DEM from. Defaults to band 1.
29
30 -a <name>
31 Provides a name for the attribute in which to put the elevation.
32 If not provided no elevation attribute is attached. Ignored in
33 polygonal contouring (-p) mode.
34
35 -amin <name>
36 Provides a name for the attribute in which to put the minimum
37 elevation of contour polygon. If not provided no minimum eleva‐
38 tion attribute is attached. Ignored in default line contouring
39 mode.
40
41 New in version 2.4.0.
42
43
44 -amax <name>
45 Provides a name for the attribute in which to put the maximum
46 elevation of contour polygon. If not provided no maximim eleva‐
47 tion attribute is attached. Ignored in default line contouring
48 mode.
49
50 New in version 2.4.0.
51
52
53 -3d Force production of 3D vectors instead of 2D. Includes eleva‐
54 tion at every vertex.
55
56 -inodata
57 Ignore any nodata value implied in the dataset - treat all val‐
58 ues as valid.
59
60 -snodata <value>
61 Input pixel value to treat as "nodata".
62
63 -f <format>
64 Create output in a particular format.
65
66 New in version 2.3.0: If not specified, the format is guessed
67 from the extension (previously was ESRI Shapefile).
68
69
70 -dsco <NAME=VALUE>
71 Dataset creation option (format specific)
72
73 -lco <NAME=VALUE>
74 Layer creation option (format specific)
75
76 -i <interval>
77 Elevation interval between contours.
78
79 -off <offset>
80 Offset from zero relative to which to interpret intervals.
81
82 -fl <level>
83 Name one or more "fixed levels" to extract.
84
85 -e <base>
86 Generate levels on an exponential scale: base ^ k, for k an
87 integer.
88
89 New in version 2.4.0.
90
91
92 -nln <name>
93 Provide a name for the output vector layer. Defaults to "con‐
94 tour".
95
96 -p Generate contour polygons rather than contour lines.
97
98 New in version 2.4.0.
99
100
101 -q Be quiet.
102
104 Functionality of this utility can be done from C with GDALContourGener‐
105 ate().
106
108 This would create 10-meter contours from the DEM data in dem.tif and
109 produce a shapefile in contour.shp|shx|dbf with the contour elevations
110 in the elev attribute.
111
112 gdal_contour -a elev dem.tif contour.shp -i 10.0
113
115 Frank Warmerdam <warmerdam@pobox.com>, Silke Reimer <silke@inteva‐
116 tion.de>
117
119 1998-2021
120
121
122
123
124 Jan 05, 2021 GDAL_CONTOUR(1)