Skip to main content
Extract a specific type of geometry from a geometry collection column as a multi-geometry column. SQL reference: ST_CollectionExtract

Signature

Parameters

ColumnOrName
required
Column for the geometry collection.
Optional[Union[ColumnOrName, int]]
default:"None"
Type of geometry to extract where 1 is point, 2 is linestring, and 3 is polygon, if None then the highest dimension geometry is extracted, defaults to None

Returns

Column
Multi-geometry column containing all geometry from collection of the selected type.