1r.slope.aspect(1) Grass User's Manual r.slope.aspect(1)
2
3
4
6 r.slope.aspect - Generates raster maps of slope, aspect, curvatures
7 and partial derivatives from an elevation raster map.
8 Aspect is calculated counterclockwise from east.
9
11 raster, terrain, aspect, slope, curvature
12
14 r.slope.aspect
15 r.slope.aspect --help
16 r.slope.aspect [-aen] elevation=name [slope=name] [aspect=name]
17 [format=string] [precision=string] [pcurvature=name] [tcurva‐
18 ture=name] [dx=name] [dy=name] [dxx=name] [dyy=name]
19 [dxy=name] [zscale=float] [min_slope=float] [--overwrite]
20 [--help] [--verbose] [--quiet] [--ui]
21
22 Flags:
23 -a
24 Do not align the current region to the raster elevation map
25
26 -e
27 Compute output at edges and near NULL values
28
29 -n
30 Create aspect as degrees clockwise from North (azimuth), with flat
31 = -9999
32 Default: degrees counter-clockwise from East, with flat = 0
33
34 --overwrite
35 Allow output files to overwrite existing files
36
37 --help
38 Print usage summary
39
40 --verbose
41 Verbose module output
42
43 --quiet
44 Quiet module output
45
46 --ui
47 Force launching GUI dialog
48
49 Parameters:
50 elevation=name [required]
51 Name of input elevation raster map
52
53 slope=name
54 Name for output slope raster map
55
56 aspect=name
57 Name for output aspect raster map
58
59 format=string
60 Format for reporting the slope
61 Options: degrees, percent
62 Default: degrees
63
64 precision=string
65 Type of output aspect and slope maps
66 Storage type for resultant raster map
67 Options: CELL, FCELL, DCELL
68 Default: FCELL
69 CELL: Integer
70 FCELL: Single precision floating point
71 DCELL: Double precision floating point
72
73 pcurvature=name
74 Name for output profile curvature raster map
75
76 tcurvature=name
77 Name for output tangential curvature raster map
78
79 dx=name
80 Name for output first order partial derivative dx (E-W slope)
81 raster map
82
83 dy=name
84 Name for output first order partial derivative dy (N-S slope)
85 raster map
86
87 dxx=name
88 Name for output second order partial derivative dxx raster map
89
90 dyy=name
91 Name for output second order partial derivative dyy raster map
92
93 dxy=name
94 Name for output second order partial derivative dxy raster map
95
96 zscale=float
97 Multiplicative factor to convert elevation units to horizontal
98 units
99 Default: 1.0
100
101 min_slope=float
102 Minimum slope value (in percent) for which aspect is computed
103 Default: 0.0
104
106 r.slope.aspect generates raster maps of slope, aspect, curvatures and
107 first and second order partial derivatives from a raster map of true
108 elevation values. The user must specify the input elevation raster map
109 and at least one output raster maps. The user can also specify the for‐
110 mat for slope (degrees, percent; default=degrees), and the zscale: mul‐
111 tiplicative factor to convert elevation units to horizontal units;
112 (default 1.0).
113
114 The elevation input raster map specified by the user must contain true
115 elevation values, not rescaled or categorized data. If the elevation
116 values are in other units than in the horizontal units, they must be
117 converted to horizontal units using the parameter zscale. In GRASS GIS
118 7, vertical units are not assumed to be meters any more. For example,
119 if both your vertical and horizontal units are feet, parameter zscale
120 must not be used.
121
122 The aspect output raster map indicates the direction that slopes are
123 facing counterclockwise from East: 90 degrees is North, 180 is West,
124 270 is South, 360 is East. Zero aspect indicates flat areas with zero
125 slope. Category and color table files are also generated for the aspect
126 raster map.
127 Note: These values can be transformed to azimuth values (90 is East,
128 180 is South, 270 is West, 360 is North) using r.mapcalc:
129 # convert angles from CCW from East to CW from North
130 # modulus (%) can not be used with floating point aspect values
131 r.mapcalc "azimuth_aspect = if(ccw_aspect == 0, 0, \
132 if(ccw_aspect < 90, 90 - ccw_aspect, \
133 450 - ccw_aspect)))"
134 Alternatively, the -n flag can be used to produce aspect as degrees CW
135 from North. Aspect for flat areas is then set to -9999 (default: 0).
136
137 The aspect for slope equal to zero (flat areas) is set to zero (-9999
138 with -n flag). Thus, most cells with a very small slope end up having
139 category 0, 45, ..., 360 in aspect output. It is possible to reduce the
140 bias in these directions by filtering out the aspect in areas where the
141 terrain is almost flat. A option min_slope can be used to specify the
142 minimum slope for which aspect is computed. For all cells with
143 slope < min_slope, both slope and aspect are set to zero.
144
145 The slope output raster map contains slope values, stated in degrees of
146 inclination from the horizontal if format=degrees option (the default)
147 is chosen, and in percent rise if format=percent option is chosen.
148 Category and color table files are generated.
149
150 Profile and tangential curvatures are the curvatures in the direction
151 of steepest slope and in the direction of the contour tangent respec‐
152 tively. The curvatures are expressed as 1/metres, e.g. a curvature of
153 0.05 corresponds to a radius of curvature of 20m. Convex form values
154 are positive and concave form values are negative.
155
156 Example DEM
157
158 Slope (degree) from example DEM Aspect (degree) from example DEM
159
160 Tangential curvature (m-1) from example DEM Profile curvature (m-1) from example DEM
161
162
163 For some applications, the user will wish to use a reclassified raster
164 map of slope that groups slope values into ranges of slope. This can be
165 done using r.reclass. An example of a useful reclassification is given
166 below:
167 category range category labels
168 (in degrees) (in percent)
169 1 0- 1 0- 2%
170 2 2- 3 3- 5%
171 3 4- 5 6- 10%
172 4 6- 8 11- 15%
173 5 9- 11 16- 20%
174 6 12- 14 21- 25%
175 7 15- 90 26% and higher
176 The following color table works well with the above
177 reclassification.
178 category red green blue
179 0 179 179 179
180 1 0 102 0
181 2 0 153 0
182 3 128 153 0
183 4 204 179 0
184 5 128 51 51
185 6 255 0 0
186 7 0 0 0
187
189 To ensure that the raster elevation map is not inappropriately resam‐
190 pled, the settings for the current region are modified slightly (for
191 the execution of the program only): the resolution is set to match the
192 resolution of the elevation raster map and the edges of the region
193 (i.e. the north, south, east and west) are shifted, if necessary, to
194 line up along edges of the nearest cells in the elevation map. If the
195 user really wants the raster elevation map resampled to the current
196 region resolution, the -a flag should be specified.
197
198 The current mask is ignored.
199
200 The algorithm used to determine slope and aspect uses a 3x3 neighbor‐
201 hood around each cell in the raster elevation map. Thus, slope and
202 aspect are not determineed for cells adjacent to the edges and NULL
203 cells in the elevation map layer. These cells are by default set to
204 nodata in output raster maps. With the -e flag, output values are esti‐
205 mated for these cells, avoiding cropping along the edges.
206
207 Horn’s formula is used to find the first order derivatives in x and y
208 directions.
209
210 Only when using integer elevation models, the aspect is biased in 0,
211 45, 90, 180, 225, 270, 315, and 360 directions; i.e., the distribution
212 of aspect categories is very uneven, with peaks at 0, 45,..., 360 cate‐
213 gories. When working with floating point elevation models, no such
214 aspect bias occurs.
215
217 Calculation of slope, aspect, profile and tangential curvature
218 In this example a slope, aspect, profile and tangential curvature map
219 are computed from an elevation raster map (North Carolina sample
220 dataset):
221 g.region raster=elevation
222 r.slope.aspect elevation=elevation slope=slope aspect=aspect pcurvature=pcurv tcurvature=tcurv
223 # set nice color tables for output raster maps
224 r.colors -n map=slope color=sepia
225 r.colors map=aspect color=aspectcolr
226 r.colors map=pcurv color=curvature
227 r.colors map=tcurv color=curvature
228
229 Figure: Slope, aspect, profile and tangential curvature raster map
230 (North Carolina dataset)
231
232 Classification of major aspect directions in compass orientation
233 In the following example (based on the North Carolina sample dataset)
234 we first generate the standard aspect map (oriented CCW from East),
235 then convert it to compass orientation, and finally classify four major
236 aspect directions (N, E, S, W):
237 g.region raster=elevation -p
238 # generate integer aspect map with degrees CCW from East
239 r.slope.aspect elevation=elevation aspect=myaspect precision=CELL
240 # generate compass orientation and classify four major directions (N, E, S, W)
241 r.mapcalc "aspect_4_directions = eval( \\
242 compass=(450 - myaspect ) % 360, \\
243 if(compass >=0. && compass < 45., 1) \\
244 + if(compass >=45. && compass < 135., 2) \\
245 + if(compass >=135. && compass < 225., 3) \\
246 + if(compass >=225. && compass < 315., 4) \\
247 + if(compass >=315., 1) \\
248 )"
249 # assign text labels
250 r.category aspect_4_directions separator=comma rules=- << EOF
251 1,north
252 2,east
253 3,south
254 4,west
255 EOF
256 # assign color table
257 r.colors aspect_4_directions rules=- << EOF
258 1 253,184,99
259 2 178,171,210
260 3 230,97,1
261 4 94,60,153
262 EOF
263 Aspect map classified to four major compass directions (zoomed subset
264 shown)
265
267 · Horn, B. K. P. (1981). Hill Shading and the Reflectance Map,
268 Proceedings of the IEEE, 69(1):14-47.
269
270 · Mitasova, H. (1985). Cartographic aspects of computer surface
271 modeling. PhD thesis. Slovak Technical University , Bratislava
272
273 · Hofierka, J., Mitasova, H., Neteler, M., 2009. Geomorphometry
274 in GRASS GIS. In: Hengl, T. and Reuter, H.I. (Eds), Geomor‐
275 phometry: Concepts, Software, Applications. Developments in
276 Soil Science, vol. 33, Elsevier, 387-410 pp, http://www.geomor‐
277 phometry.org
278
280 r.mapcalc, r.neighbors, r.reclass, r.rescale
281
283 Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
284 Olga Waupotitsch, U.S.Army Construction Engineering Research Laboratory
285
287 Available at: r.slope.aspect source code (history)
288
289 Main index | Raster index | Topics index | Keywords index | Graphical
290 index | Full index
291
292 © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
293
294
295
296GRASS 7.8.2 r.slope.aspect(1)