Slope Algorithms
Znw

Zn

Zne

Zw

Z

Ze

Zsw

Zs

Zse

The slope is taken as a dZ value divided by a horizontal
distance. The horizontal distance is the data spacing
(eastwest, northsouth, or diagonal) for the one point and nine
point methods, and twice that distance for the four and eight
point methods. For DEMs like the USGS 10 m and 30, the NS
and EW spacings are the same; they differ for data like the USGS
NED, USGS 1:250K DEM, SRTM, and DTED with geographic spacing.
Aspect, the downhill direction, can be computed as a byproduct of the slope
computation.
Slope and aspects, the magnitude and direction of the vector
tangent to the topographic surface pointing downhill at a point,
have been computed with a multitude of methods; Eyton (1991) and Carter (1992) list a
number of references. The following discussion centers on the
methods implemented in MICRODEM; the references point to clear
expositions of the method, and not necessarily the first use of
the method, many of which are in hard to location publications in the gray
literature. The algorithms fall into several categories,
depending on the number of neighboring points considered to
compute the slope and aspect.
Preferred slope algorithm, In general the
choice of slope algorithm does not make much difference, and you should just
stick with the default.
Two neighbors:
 Batson & others (1975):
calculates component of slope in direction of one of the
nearest neighbors. Strictly speaking this value of slope
should be assigned to a spot halfway between the point
and the neighbor used. This is the fastest algorithm,
with no calculation for aspect, and has limited
applicability. MICRODEM used it at one time for modeling
radar reflectivity from the DEM, as the look direction
for SLAR is typically to the east or west.
Three neighbors:
 O'Neill & Mark (1987):
three points uniquely define a plane; this algorithm uses
the point and its neighbors to the north and east (Z, Zn,
and Ze). The simplest measure, it has the lowest
correlations with all other methods. Other equally
arbitrary choices of points to use would give different
slopes and aspect directions. This method would be used
for TINs, where the slope and aspect apply to the
triangular facet and not the point at which the slope
will change. Called the “simple method” by
Jones (1998) who chose the points to the north and
west. This method assigns the values from the
triangle to the point in the center and assumes it covers
a rectangular grid. A more sophisticated, but
harder to implement, version would compute a different
slope for each of the eight triangular regions about the
point.
 Four contiguous right triangles (Onorati and others, 1992)
Subpixel calculations: using two neighbors about the
point, four subpixels can be computed. The four use
points (Z, Zn, Zw), (Z, Zn, Ze), (Z, Zs,
Zw), and (Z, Zs, Ze).
Four neighbors to N, S, E, and W (excluding point itself) (rook's case):
 Four neighbors (e.g. Ritter, 1987;
Zevenbergen and Thorne, 1987; Band, 1989; Eyton, 1991;
Carter, 1992) This appears to be the most commonly
used algorithm. Called the Fleming & Hoffer (1979)
method by Jones (1998) for a Purdue University technical
report. Evans (1972) may have described this
method, and amplified it in Durham University technical
reports (Evans, 1979; Young, 1978); Shary (2002) calls
this the EvansYoung method. This gets a dx from ZeZw,
and a dy from ZnZs, and calculates the slope and aspect
from them. The value is assigned to the central
point, even though its elevation is not used in the
calculation.
Four neighbors to NW, SE,N E, and SW (excluding point itself) (bishop's case):
 Diagonal Ritters: proposed by Jones (1998), using the 4
diagonal neighbors. This gets a "dx" from
ZnwZse, and a "dy" from ZneZsw, and
calculates the slope and aspect from them. This
effectively averages slopes over a longer distance, since
the diagonals are longer than the distances to the
nearest neighbors. The value is assigned to the central
point, even though its elevation is not used in the
calculation.
Eight neighbors (excluding point itself) (Queen's case):
 Horn method (Horn, 1981): nearest points weighted more
than diagonal neighbors. This method is also known as the
Sobel operator (Richards, 1986). The point itself has no
influence on the calculated slope (Guth,
1995). Jones (1998) discusses two variants, using 1/r
and 1/r² weightings. The value is assigned to the
central point, even though its elevation is not used in
the calculation.
 Sharpnack & Akin (Sharpnack and Akin, 1969; also
"mean method" in LAS, cited in Ritter, 1987):
all neighbors weighted equally. The point itself has no
influence on the calculated slope (Guth,
1995) The value is assigned to the central
point, even though its elevation is not used in the
calculation.
 Local Trend Surface (Heerdegen and Beran, 1982): this
method is equivalent to fitting a second order trend
surface (z = a + bx + cy + dx² + ey² + fxy) to the nine
points using the algorithm in Davis (1973), but an order
of magnitude faster. The algorithm was modified for
MICRODEM to allow different x and y data spacing, but
gives the same results as the Sharpnack & Akin
algorithm. The point itself has no influence on the
calculated slope (Guth, 1995).The
value is assigned to the central point, even though its
elevation is not used in the calculation.
 Constrained quadratic surface method (Wood, 1996 thesis,
cited in Jones, 1998). The trend surface is constrained
to go through the point itself. The value is
assigned to the central point.
Nine points:
 Steepest Adjacent Neighbor (Collins,
1975; Travis et al. 1975, Dept of Agriculture Forest
Service Technical Report cited in Jones 1998; ELAS
software cited in Ritter, 1987): this method
consistently gives steeper results than all others. It
picks the steepest of the eight adjacent points,
considering that the diagonal distance is longer and that
the x and y spacings might be different. The aspect is
only available to the nearest 45° (approximate if the x
and y spacings differ), and if the steepest slope is
uphill is assigned as the opposite of the slope
direction, which may not be the steepest downhill
slope. The value is assigned to the central point.
 slope1 = (ZnZ) / (NS Spacing)
 slope2 = (ZsZ) / (NS Spacing)
 slope3 = (ZeZ) / (EW Spacing)
 slope4 = (ZwZ) / (EW Spacing)
 slope5 = (ZnwZ) / (Diagonal Spacing)
 slope6 = (ZneZ) / (Diagonal Spacing)
 slope7 = (ZseZ) / (Diagonal Spacing)
 slope8 = (ZswZ) / (Diagonal Spacing)
 Pick largest absolute value from eight candidates
as the slope
 Steepest downhill neighbor (D8): similar to the steepest
neighbor, but the point must be lower in elevation than
the central point. The value is assigned to the
central point. Most drainage basin algorithms use a
variant of this algorithm, looking only for the neighbor
into which water will flow.
 Average neighbor: averages slopes to the eight
nearest neighbors. Its estimate is about 50% of the
Steepest neighbor, because the slopes at 90° to the
maximum will typically be nearly horizontal. The
value is assigned to the central point.
Table. Selected Slope and Aspect Algorithms adapted from Guth (1995).
Neighbors

Points Used

Selected Reference

2

z,ze

Batson & others (1975); No aspect

3

z,zn,zne

O'Neill & Mark (1987)

4

zn,zs,ze,zw

Eyton (1991); Carter (1992)

8

zn,zne,ze,zse,zs,zsw,zw,znw

Differential weights (Horn, 1981);
Sobel operator (Richards, 1986)

8

zn,zne,ze,zse,zs,zsw,zw,znw

Identical weights (Sharpnack & Akin, 1969)

8

zn,zne,ze,zse,zs,zsw,zw,znw

Heerdegen & Beran (1982)

8

zn,zne,ze,zse,zs,zsw,zw,znw

Local trend surface (Davis, 1973)

9

z,zn,zne,ze,zse,zs,zsw,zw,znw

Steepest Neighbor (Collins, 1975); Only 8 aspects

9

z,zn,zne,ze,zse,zs,zsw,zw,znw

Steepest Downhill Neighbor; Only 8 aspects

9

z,zn,zne,ze,zse,zs,zsw,zw,znw

Average Neighbor; Only 8 aspects

Maps showing where slope algorithms differ.
Slope
references
Slope units, in percent.
Discussions of slope on arcsecond DEMs
Last revised 8/29/2018