Skip to content
🎉 Apache Sedona 1.8.1 is now available! Check out the new features and improvements.

ST_MPolyFromText

Introduction: Construct a MultiPolygon from Wkt. If srid is not set, it defaults to 0 (unknown).

Format: ST_MPolyFromText (Wkt:string) ST_MPolyFromText (Wkt:string, srid:integer)

SQL example:

SELECT ST_MPolyFromText('MULTIPOLYGON(((0 0 1,20 0 1,20 20 1,0 20 1,0 0 1),(5 5 3,5 7 3,7 7 3,7 5 3,5 5 3)))')

Output:

MULTIPOLYGON (((0 0, 20 0, 20 20, 0 20, 0 0), (5 5, 5 7, 7 7, 7 5, 5 5)))