ST_Aspect — Returns the surface aspect of an elevation raster band. Useful for analyzing terrain.
raster ST_Aspect(raster rast, integer band, text pixeltype
Returns the surface aspect of an elevation raster band. Utilizes map algebra and applies the aspect equation to neighboring pixels.
Given the following representation of a 3x3 neighborhood of pixels:
The equation for the pixel aspect of cell E is: atan2((((G + 2H + I) - (A + 2B + C)) / 8), -(((C + 2F + I) - (A + 2D + G)) / 8))