ST_CollectionExtract
Signature
Parameters
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
Extract a specific type of geometry from a geometry collection column as a multi-geometry column.
ST_CollectionExtract