Slope angle, also known as slope gradient, is the angle α (Figure 1), between a path p in the horizontal plane and the sloping terrain. The path p must be chosen such that the angle α is maximal.
A slope angle can be expressed as elevation gain in a percentage or as a geometric angle, in degrees or radians. The two respective formulas are:
The path p must be chosen to provide the highest slope-angle value and thus it can lie in any direction. The compass direction, converted to an angle to North, of this maximal downslope path p is what is called the slope aspect.
Let us now look at how to compute slope angle in a raster environment.
From an elevation raster, we cannot “read” the slope angle or slope aspect directly. Yet that information can be extracted. After all, for an arbitrary cell, we have its elevation value, plus those of its eight neighbouring cells. A simple approach to slope angle computation is to make use of x- and y- gradient filters. The x- gradient filter determines the slope increase ratio from west to east: if the elevation to the west of the centre cell is 1540 m and that to the east of the centre cell is 1552 m, then apparently along this transect the elevation increases 12 m per two cell widths, i.e. the x- gradient is 6 m per cell width. The y- gradient filter operates entirely analogously, though in the south-north direction.
Observe that both filters express elevation gain per cell width. This means that we must divide by the cell width - given in metres, for example - to obtain the (approximations to) the true derivatives δf ∕ δx and δf ∕ δy. Here, f stands for the elevation field as a function of x and y, and δf ∕ δx, for instance, is the elevation gain per unit of length in the x-direction.
To obtain the real slope angle α along path p, observe that both the x- and y- gradient contribute to it. This is illustrated in Figure 2. A not-so-simple geometric derivation can show that always:
In the practice of computing local slope angles from an elevation raster, this means that we must perform the following steps:
Compute from (input) elevation raster R the non-normalized x- and y- gradients.
Normalize the resulting rasters by dividing by the cell width, expressed in units of length such as metres.
Use both rasters for generating a third raster, applying the formula above, and possibly even an arctan function to the result, to obtain the slope angle α for each cell.
Classify and explain spatial analysis functions (measurements, classification, overlay, neighbourhood and connectivity) in a raster and vector environment (level 1 and 2).