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

NAME

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

KEYWORDS

11       raster, terrain, aspect, slope, curvature
12

SYNOPSIS

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

DESCRIPTION

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       Note:  The reason for using -9999 is to be compliant with gdaldem which
137       uses -9999 by default as the nodata value.
138
139       The aspect for slope equal to zero (flat areas) is set to  zero  (-9999
140       with  -n  flag). Thus, most cells with a very small slope end up having
141       category 0, 45, ..., 360 in aspect output. It is possible to reduce the
142       bias in these directions by filtering out the aspect in areas where the
143       terrain is almost flat. A option min_slope can be used to  specify  the
144       minimum  slope  for  which  aspect  is  computed.  For  all  cells with
145       slope < min_slope, both slope and aspect are set to zero.
146
147       The slope output raster map contains slope values, stated in degrees of
148       inclination  from the horizontal if format=degrees option (the default)
149       is chosen, and in percent rise  if  format=percent  option  is  chosen.
150       Category and color table files are generated.
151
152       Profile  and  tangential curvatures are the curvatures in the direction
153       of steepest slope and in the direction of the contour  tangent  respec‐
154       tively.  The  curvatures are expressed as 1/metres, e.g. a curvature of
155       0.05 corresponds to a radius of curvature of 20m.  Convex  form  values
156       are positive and concave form values are negative.
157
158       Example DEM
159
160       Slope (degree) from example DEM                              Aspect (degree) from example DEM
161
162       Tangential curvature (m-1) from example DEM                  Profile curvature (m-1) from example DEM
163
164
165       For  some applications, the user will wish to use a reclassified raster
166       map of slope that groups slope values into ranges of slope. This can be
167       done  using r.reclass. An example of a useful reclassification is given
168       below:
169                 category      range   category labels
170                            (in degrees)    (in percent)
171                    1         0-  1             0-  2%
172                    2         2-  3             3-  5%
173                    3         4-  5             6- 10%
174                    4         6-  8            11- 15%
175                    5         9- 11            16- 20%
176                    6        12- 14            21- 25%
177                    7        15- 90            26% and higher
178            The following color table works well with the above
179            reclassification.
180                 category   red   green   blue
181                    0       179    179     179
182                    1         0    102       0
183                    2         0    153       0
184                    3       128    153       0
185                    4       204    179       0
186                    5       128     51      51
187                    6       255      0       0
188                    7         0      0       0
189

NOTES

191       To ensure that the raster elevation map is not  inappropriately  resam‐
192       pled,  the  settings  for the current region are modified slightly (for
193       the execution of the program only): the resolution is set to match  the
194       resolution  of  the  elevation  raster  map and the edges of the region
195       (i.e. the north, south, east and west) are shifted,  if  necessary,  to
196       line  up  along edges of the nearest cells in the elevation map. If the
197       user really wants the raster elevation map  resampled  to  the  current
198       region resolution, the -a flag should be specified.
199
200       The current mask is ignored.
201
202       The  algorithm  used to determine slope and aspect uses a 3x3 neighbor‐
203       hood around each cell in the raster  elevation  map.  Thus,  slope  and
204       aspect  are  not  determineed  for cells adjacent to the edges and NULL
205       cells in the elevation map layer. These cells are  by  default  set  to
206       nodata in output raster maps. With the -e flag, output values are esti‐
207       mated for these cells, avoiding cropping along the edges.
208
209       Horn’s formula is used to find the first order derivatives in x  and  y
210       directions.
211
212       Only  when  using  integer elevation models, the aspect is biased in 0,
213       45, 90, 180, 225, 270, 315, and 360 directions; i.e., the  distribution
214       of aspect categories is very uneven, with peaks at 0, 45,..., 360 cate‐
215       gories.  When working with floating point  elevation  models,  no  such
216       aspect bias occurs.
217

EXAMPLES

219   Calculation of slope, aspect, profile and tangential curvature
220       In  this  example a slope, aspect, profile and tangential curvature map
221       are computed from  an  elevation  raster  map  (North  Carolina  sample
222       dataset):
223       g.region raster=elevation
224       r.slope.aspect elevation=elevation slope=slope aspect=aspect pcurvature=pcurv tcurvature=tcurv
225       # set nice color tables for output raster maps
226       r.colors -n map=slope color=sepia
227       r.colors map=aspect color=aspectcolr
228       r.colors map=pcurv color=curvature
229       r.colors map=tcurv color=curvature
230
231       Figure:  Slope,  aspect,  profile  and  tangential curvature raster map
232       (North Carolina dataset)
233
234   Classification of major aspect directions in compass orientation
235       In the following example (based on the North Carolina  sample  dataset)
236       we  first  generate  the  standard aspect map (oriented CCW from East),
237       then convert it to compass orientation, and finally classify four major
238       aspect directions (N, E, S, W):
239       g.region raster=elevation -p
240       # generate integer aspect map with degrees CCW from East
241       r.slope.aspect elevation=elevation aspect=myaspect precision=CELL
242       # generate compass orientation and classify four major directions (N, E, S, W)
243       r.mapcalc "aspect_4_directions = eval( \\
244          compass=(450 - myaspect ) % 360, \\
245            if(compass >=0. && compass < 45., 1)  \\
246          + if(compass >=45. && compass < 135., 2) \\
247          + if(compass >=135. && compass < 225., 3) \\
248          + if(compass >=225. && compass < 315., 4) \\
249          + if(compass >=315., 1) \\
250       )"
251       # assign text labels
252       r.category aspect_4_directions separator=comma rules=- << EOF
253       1,north
254       2,east
255       3,south
256       4,west
257       EOF
258       # assign color table
259       r.colors aspect_4_directions rules=- << EOF
260       1 253,184,99
261       2 178,171,210
262       3 230,97,1
263       4 94,60,153
264       EOF
265       Aspect  map  classified to four major compass directions (zoomed subset
266       shown)
267

REFERENCES

269           ·   Horn, B. K. P. (1981). Hill Shading and  the  Reflectance  Map,
270               Proceedings of the IEEE, 69(1):14-47.
271
272           ·   Mitasova,  H.  (1985). Cartographic aspects of computer surface
273               modeling. PhD thesis.  Slovak Technical University , Bratislava
274
275           ·   Hofierka, J., Mitasova, H., Neteler, M.,  2009.  Geomorphometry
276               in  GRASS  GIS.   In: Hengl, T. and Reuter, H.I. (Eds), Geomor‐
277               phometry: Concepts, Software,  Applications.   Developments  in
278               Soil Science, vol. 33, Elsevier, 387-410 pp, http://www.geomor
279               phometry.org
280

SEE ALSO

282        r.mapcalc, r.neighbors, r.reclass, r.rescale
283

AUTHORS

285       Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
286       Olga Waupotitsch, U.S.Army Construction Engineering Research Laboratory
287

SOURCE CODE

289       Available at: r.slope.aspect source code (history)
290
291       Main index | Raster index | Topics index | Keywords index  |  Graphical
292       index | Full index
293
294       © 2003-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual
295
296
297
298GRASS 7.8.5                                                  r.slope.aspect(1)
Impressum