All Products
Search
Document Center

ApsaraDB RDS:ST_Polygonize

Last Updated:Mar 28, 2026

Vectorizes a raster (grid) object based on its pixel value.

Syntax

setof record ST_Polygonize( raster rast,
                            integer bandnumber,
                            out geom geometry,
                            out id integer,
                            out value float8);

Parameters

ParameterRequiredDescription
rastYesThe input grid object.
bandnumberYesThe band to vectorize. The value starts from 0.

Example

The following example vectorizes band 1 of the raster stored in rast_table where id = 1:

SELECT ST_Polygonize(rast, 1) FROM rast_table WHERE id = 1;

Input

image.png

Output

image.png