ST_Aspect
This function calculates the aspect from each cell on the surface of a raster object and returns an array of aspects.
Syntax
raster ST_Aspect(raster rast, integer pyramid_level, integer band, Box extent, BoxType type, cstring storageOption);Parameters
Parameter Name | Description |
rast | The raster object. |
pyramid_level | The pyramid level. |
Band | The band index. |
box | The analysis area, in the format |
type | The coordinate type for the analysis area. The value must be one of the following:
|
storageOption | The storage options for the destination raster object. For more information, see ST_ClipToRast. |
Description
The ST_Aspect function is used to calculate the aspect from the surface of a raster object. The aspect identifies the downslope direction of the maximum rate of change in a value from each cell to neighboring cells. The aspect can be considered the slope direction. The value of each cell in the output raster object indicates the compass direction of the aspect. The aspect is measured clockwise from the north. Unit: degrees. Valid values: 0 to 360. Cells in the input raster object that are flat and do not have a downslope direction are assigned an aspect of -1 in the output raster object.
The value of a cell in the aspect dataset of the output raster object indicates the slope direction of the cell.
Example:
select st_aspect(rast, 0, 0, '(0,0), (5,5)', 'Raster') from t_surface where id=1;