1r.contour(1)                GRASS GIS User's Manual               r.contour(1)
2
3
4

NAME

6       r.contour   - Produces a vector map of specified contours from a raster
7       map.
8

KEYWORDS

10       raster, surface, contours, vector
11

SYNOPSIS

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]   [cut=in‐
17       teger]   [--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

DESCRIPTION

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

NOTES

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 ig‐
73       nored.
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

EXAMPLES

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 el‐
95       evation 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 Li‐
104       DAR 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

AUTHORS

110       Terry Baker, U.S. Army Construction Engineering Research Laboratory
111       3/2001: cut parameter and fixes by Andrea Aime (aaime@libero.it)
112

SOURCE CODE

114       Available at: r.contour source code (history)
115
116       Accessed: Saturday Jan 21 20:38:22 2023
117
118       Main index | Raster index | Topics index | Keywords index  |  Graphical
119       index | Full index
120
121       © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
122
123
124
125GRASS 8.2.1                                                       r.contour(1)
Impressum