ST_MPolyFromText()

ST_MPolyFromText creates a MULTIPOLYGON geometry from WKT.

Syntax

ST_MPolyFromText(wkt)

Aliases: ST_MultiPolygonFromText().

Arguments

Argument

Description

wkt

VARCHAR WKT.

Return Value

Returns a GEOMETRY value.

Usage Notes

Examples

DROP DATABASE IF EXISTS geo_io_example;
CREATE DATABASE geo_io_example;
USE geo_io_example;

SELECT ST_AsText(ST_MPolyFromText('MULTIPOLYGON(((0 0,1 0,1 1,0 0)))')) AS multipolygon;

DROP DATABASE geo_io_example;

See Also

ST_MPolyFromWKB(), ST_GeomFromText().