Available with Spatial Analyst license.
Aspect identifies the downslope direction of the maximum rate of change in value from each cell to its neighbors. It can be thought of as the slope direction. The values of each cell in the output raster indicate the compass direction that the surface faces at that location. It is measured clockwise in degrees from 0 (due north) to 360 (again due north), coming full circle. Flat areas having no downslope direction are given a value of -1.
The value of each cell in an aspect dataset indicates the direction the cell's slope faces.
Conceptually, the Aspect tool fits a plane to the z-values of a 3 x 3 cell neighborhood around the processing or center cell. The direction the plane faces is the aspect for the processing cell.
The following diagram shows an input elevation dataset and the output aspect raster.
Why use the Aspect tool?
With the Aspect tool, you can do the following:
- Find all north-facing slopes on a mountain as part of a search for the best slopes for ski runs.
- Calculate the solar illumination for each location in a region as part of a study to determine the diversity of life at each site.
- Find all southerly slopes in a mountainous region to identify locations where the snow is likely to melt first as part of a study to identify those residential locations likely to be hit by runoff first.
- Identify areas of flat land to find an area for a plane to land in an emergency.
The Aspect algorithm
A moving 3 x 3 window visits each cell in the input raster, and for each cell in the center of the window, an aspect value is calculated using an algorithm that incorporates the values of the cell's eight neighbors. The cells are identified as letters a to i, with e representing the cell for which the aspect is being calculated.
The rate of change in the x direction for cell e is calculated with the following algorithm:
[dz/dx] = ((c + 2f + i) - (a + 2d + g)) / 8
The rate of change in the y direction for cell e is calculated with the following algorithm:
[dz/dy] = ((g + 2h + i) - (a + 2b + c)) / 8
Taking the rate of change in both the x and y direction for cell e, aspect is calculated using:
aspect = 57.29578 * atan2 ([dz/dy], -[dz/dx])
The aspect value is then converted to compass direction values (0-360 degrees), according to the following rule:
if aspect < 0 cell = 90.0 - aspect else if aspect > 90.0 cell = 360.0 - aspect + 90.0 else cell = 90.0 - aspect
An Aspect calculation example
As an example, the aspect value of the center cell of the moving window will be calculated.
The rate of change in the x direction for the center cell e is:
[dz/dx] = ((c + 2f + i) - (a + 2d + g)) / 8 = ((85 + 170 + 84)) - (101 + 202 + 101)) / 8 = -8.125
The rate of change in the y direction for cell e is:
[dz/dy] = ((g + 2h + i) - (a + 2b + c)) / 8 = ((101 + 182 + 84) - (101 + 184 + 85)) / 8 = -0.375
The aspect is calculated as:
aspect = 57.29578 * atan2 ([dz/dy], -[dz/dx]) = 57.29578 * atan2 (-0.375, 8.125) = -2.64
Since the calculated value is less than zero, the final rule will be applied as:
cell = 90.0 - aspect = 90 - (-2.64) = 90 + 2.64 = 92.64
The value of 92.64 for the center cell e indicates that its aspect is in the easterly direction.
Burrough, P. A., and McDonell, R. A., 1998. Principles of Geographical Information Systems (Oxford University Press, New York), 190 pp.