ST_Slope — Returns the surface slope of an elevation raster band. Useful for analyzing terrain.
raster ST_Slope(
raster rast, integer band, text pixeltype)
;
Returns the surface slope of an elevation raster band. Utilizes map algebra and applies the slope equation to neighboring pixels.
Given the following representation of a 3x3 neighborhood of pixels:
A | B | C |
D | E | F |
G | H | I |
The equation for the pixel slope of cell E is: atan(sqrt(((c + 2f + i) - (a + 2d + g) / 8)^2 + (((g + 2h + i) - (a + 2b + c)) / 8) ^ 2))
Availability: 2.0.0