Skip to main content
Returns an array of Polygons for the corresponding S2 cell IDs.
To convert a Polygon array to MultiPolygon, use ST_Collect. However, the result may be an invalid geometry. Apply ST_MakeValid to the ST_Collect output to ensure a valid MultiPolygon.An alternative approach to consolidate a Polygon array into a Polygon/MultiPolygon, use the ST_Union function.

Signatures

Parameters

cellIds
Array[Long]
required
The cell ids value.

Return type

The resulting geometry.

Example

ST_S2ToGeom