Constructs a Geography Collection from a WKT (Well-Known Text) string. If SRID is not set, it defaults to 0 (unknown). The input WKT must represent a geometry collection.
Signatures
ST_GeogCollFromText(wkt: String)
ST_GeogCollFromText(wkt: String, srid: Integer)
Parameters
A Well-Known Text (WKT) representation of a geometry collection.
Spatial Reference Identifier. Defaults to 0 if not specified.
Return type
The constructed geography collection object.
Examples
SELECT ST_GeogCollFromText('GEOMETRYCOLLECTION (POINT (1 2), LINESTRING (1 2, 3 4))')
GEOMETRYCOLLECTION (POINT (1 2), LINESTRING (1 2, 3 4))
SELECT ST_AsEWKT(ST_GeogCollFromText('GEOMETRYCOLLECTION (POINT (1 2), POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0)))', 4326))
SRID=4326; GEOMETRYCOLLECTION (POINT (1 2), POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0)))