PostGIS

ST_GeomCollFromText

Prev

8.8.1. Well-Known Text (WKT)

Next

Name

ST_GeomCollFromText — Makes a collection Geometry from collection WKT with the given SRID. If SRID is not given, it defaults to 0.

Synopsis

geometry +`*`+ST_GeomCollFromText*(`text `WKT, integer srid`)`;

geometry +`*`+ST_GeomCollFromText*(`text `WKT`)`;

Description

Makes a collection Geometry from the Well-Known-Text (WKT) representation with the given SRID. If SRID is not given, it defaults to 0.

OGC SPEC 3.2.6.2 - option SRID is from the conformance suite

Returns null if the WKT is not a GEOMETRYCOLLECTION

Note

If you are absolutely sure all your WKT geometries are collections, don’t use this function. It is slower than ST_GeomFromText since it adds an additional validation step.

check This method implements the SQL/MM specification.

Examples

SELECT ST_GeomCollFromText('GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(1 2, 3 4))');

See Also

Prev

Up

Next

ST_GeographyFromText

Home

ST_GeomFromEWKT