ST_Contour — Generates a set of vector contours from the provided raster band, using the GDAL contouring algorithm.
setof record ST_Contour(raster rast, integer bandnumber=1, double precision level_interval=100.0, double precision level_base=0.0, double precision[] fixed_levels=ARRAY[], boolean polygonize=false);
Generates a set of vector contours from the provided raster band, using the GDAL contouring algorithm.
When the fixed_levels parameter is a non-empty
array, the level_interval and level_base parameters are ignored.
Input parameters are:
rastThe raster to generate the contour of
bandnumberThe band to generate the contour of
level_intervalThe elevation interval between contours generated
level_baseThe "base" relative to which contour intervals are applied, this is normally zero, but could be different. To generate 10m contours at 5, 15, 25, ... the LEVEL_BASE would be 5.
fixed_levelsThe elevation interval between contours generated
polygonizeIf true, contour polygons will be created, rather than polygon lines.
Return values are a set of records with the following attributes:
The geometry of the contour line.
A unique identifier given to the contour line by GDAL.
The raster value the line represents. For an elevation DEM input, this would be the elevation of the output contour.
Availability: 3.2.0