1r.contour(1) Grass User's Manual r.contour(1)
2
3
4
6 r.contour - Produces a vector map of specified contours from a raster
7 map.
8
10 raster, surface, contours, vector
11
13 r.contour
14 r.contour --help
15 r.contour [-t] input=name output=name [step=float] [lev‐
16 els=float[,float,...]] [minlevel=float] [maxlevel=float]
17 [cut=integer] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
18
19 Flags:
20 -t
21 Do not create attribute table
22
23 --overwrite
24 Allow output files to overwrite existing files
25
26 --help
27 Print usage summary
28
29 --verbose
30 Verbose module output
31
32 --quiet
33 Quiet module output
34
35 --ui
36 Force launching GUI dialog
37
38 Parameters:
39 input=name [required]
40 Name of input raster map
41
42 output=name [required]
43 Name for output vector map
44
45 step=float
46 Increment between contour levels
47
48 levels=float[,float,...]
49 List of contour levels
50
51 minlevel=float
52 Minimum contour level
53
54 maxlevel=float
55 Maximum contour level
56
57 cut=integer
58 Minimum number of points for a contour line (0 -> no limit)
59 Default: 2
60
62 r.contour produces a vector map of specified contours from input raster
63 map. Contours can be produced using a comma-separated list of values
64 in levels, or at some regular increment using the step parameter, using
65 minlevel and maxlevel as minimum and maximum contour values, respec‐
66 tively. If no minlevel or maxlevel is specified, the minimum and maxi‐
67 mum cell values in the input raster map will be used.
68
70 r.contour will either step through incremental contours or produce con‐
71 tours from a list of levels, not both. If both a list of levels and a
72 step are specified, the list will be produced and the step will be
73 ignored.
74
75 Zero is treated as a valid data value by r.contour.
76
77 If a contour level exactly matches a category value in the raster map,
78 the contour line may backtrack on itself, causing illegal arcs to be
79 produced in the output vector map.
80
81 The optional cut parameter allows the user to specify a minimum number
82 of raster cells eligilble to be included in a contour line written to
83 the output vector map. It acts like a filter, omitting spurs, single
84 points, etc., making the output more generalized.
85
87 In the Spearfish location, produce a vector contour map from input
88 raster elevation.dem with contour levels from 1000m to 2000m, 100m con‐
89 tour step, and a minimum of 200 input raster points contributing to the
90 contour line:
91 r.contour input=elevation.dem output=elevation_dem_contours \
92 minlevel=1000 maxlevel=2000 step=100 cut=200
93
94 For an example of using levels with r.contour this example uses the
95 elevation map from the North Carolina database:
96 g.region raster=elevation
97 r.contour in=elevation out=contours levels=60,90,120,150 --o
98 d.mon wx0
99 d.rast elevation_shade
100 d.vect contours color=red
101 Contour lines shown on shaded terrain map
102
103 For an example of using steps with r.contour this example uses the
104 LiDAR data derived elevation map from the North Carolina database:
105 g.region raster=elev_lid792_1m -p
106 r.contour input=elev_lid792_1m output=elev_lid792_1m_contours \
107 minlevel=100 maxlevel=150 step=10
108
110 Terry Baker, U.S. Army Construction Engineering Research Laboratory
111 3/2001: cut parameter and fixes by Andrea Aime (aaime@libero.it)
112
113 Last changed: $Date: 2016-12-09 19:14:52 +0100 (Fri, 09 Dec 2016) $
114
116 Available at: r.contour source code (history)
117
118 Main index | Raster index | Topics index | Keywords index | Graphical
119 index | Full index
120
121 © 2003-2019 GRASS Development Team, GRASS GIS 7.4.4 Reference Manual
122
123
124
125GRASS 7.4.4 r.contour(1)