Digital Terrain Analysis 3

Terrain Characteristics
Slope
How do you determine slope from a DEM?
grid values

3 4 5
5 7 8
6 9 10

One can calculate a simple slope in either the north-south or east west
direction, and use a maximum or average slope.

For a 20 unit cell spacing that’s 3/40 (7.5%) for EW and (12.5%) for NS.

Or calculate a minimum adjacent cell and get the slope from the center cell
where the slope gradient here is (7-3)/28 = 14%

or from the min to the max

Or even use a least square approach to “fitting” a surface to the 9 points in the 3×3 neighborhood (computationally expensive, however).


From the ArcView Help files, here is the way in which slope is calculated, which is a weighted two-directional slope (same in ArcGIS?).

The actual algorithm that is used to calculate slope is: 
rise_run = SQRT(SQR(dz/dx)+SQR(dz/dy)) 
degree_slope = ATAN(rise_run) * 57.29578 
where the deltas are calculated using a 3x3 roving window, where a - i represent the values in the window: 
     a   b   c 
     d   e   f 
     g   h   i 
(dz/dx) = ((a + 2d + g) - (c + 2f + i)) / (8 * x_mesh_spacing) 
(dz/dy) = ((a + 2b + c) - (g + 2h + i)) / (8 * y_mesh_spacing)

Which works out like this…

Slope maps map from topographic contours contain loads of artifacts because of the “flat triangles” describe in the TIN section previously.
Their quality depends on the interpolation algorithm, and whether grid or tin.
Below is the Roanoke West 1 degree quad created from the contour lines. Note the terracing of the data (is it similar to the 1/3 second DEM?).


note especially the SE corner.