Name

ST_MPolyFromText — Constructs a MultiPolygon object given its Well-known text Representation

Synopsis

geometry ST_MPolyFromText(varchar WKT);

geometry ST_MPolyFromText(varchar WKT, integer SRID);

Alias

MPolyFromText

Description

Constructs a MultiPolygon object given its Well-known text Representation. If the SRID is not provided it defaults to -1.

Returns Null when the WKT is not a MultiPolygon or MultiPolygonM.

Coordinate Dimensions
2D3DM
Spatial Standards Support
OGC SFS for SQL. 1.1 (1999)OGC SFS for SQL. 1.1.0 (2005)OGC SFS for SQL. 1.2.0 (2006)SQL-MM Part 3
3.2.6.27.2.6.1-9.6.4

Examples

SELECT ST_MPolyFromText('MULTIPOLYGON (((0 0, 150 150, 150 0, 0 0)),((350 0, 200 0, 350 120, 350 0)))');
SELECT ST_MPolyFromText('MULTIPOLYGON (((0 0, 150 150, 150 0, 0 0)),((350 0, 200 0, 350 120, 350 0)))',25830);

Related functions

ST_GeomFromText