This topic describes the ST_Polygonize function. This function vectorizes a grid object based on its pixel value.
Syntax
setof record ST_Polygonize( raster rast,
integer bandnumber,
cstring options,
out geom geometry,
out id integer,
out value float8);
Parameters
Parameter | Required | Description |
rast | Yes | The input grid object. |
bandnumber | Yes | The number of the band. The value starts from 0. |
options | No | The vectorization configuration. |
The following table describes the fields of the options parameter.
Field | Type | Description | Default value |
ingoreValue | float | The value to be ignored. The value is not required to participate in the vectorization calculation except for nodata (invalid value). | 0 |
Examples
select ST_Polygonize(rast,1,'{"ingoreValue":0}') from rast_table where id=1;
Input
Output