Slope and Aspect Calculation

Submitted by Sixsmith Joshua on Fri, 17/05/2019 - 16:28
Short Description

For a given Digital Elevation Model (DSM) calculate at a pixel level the slope and aspect.

The following steps dictate the method for determining slope and aspect.

  1. A sobel filter is used to determine the rate of change at a pixel level for both the horizontal and vertical directions (dz/dx & dz/dy)
  2. Slope in radians = ATAN ( √ ([dz/dx]^2 + [dz/dy]^2) )
  3. Aspect in radians = atan2 ([dz/dy], -[dz/dx])

Both arrays are then converted to degrees.