Name

ST_BdMPolyFromText — Return a specified ST_MultiPolygon value.

Synopsis

geometry ST_BdMPolyFromText(varchar WKT, integer SRID);

Alias

BdMPolyFromText

Description

Construct a MultiPolygon given an arbitrary collection of closed linestrings as a MultiLineString text representation. An INTEGER value srid is required as input parameter.

If the incoming geometry is not a LINESTRING throws an error.

If the Multilinestring is not closed, returns NULL.

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.7

Examples

select st_asewkt(ST_BdMPolyFromText('MULTILINESTRING ((0 0 -10, 1 0 -5, 1 1 -5, 0 1 -5, 0 0 10), 
  (2 2 -3, 4 2 -1, 4 4 -1, 2 4 -1, 2 2 -3))', -1)) as MP; 

---Result
MP  
MULTIPOLYGON (((2 2 -3, 2 4 -1, 4 4 -1, 4 2 -1, 2 2 -3)), ((0 0 10, 0 1 -5, 1 1 -5, 1 0 -5, 0 0 -10)))

Related functions

ST_BdPolyFromText