MPolyFromWKB

Syntax

MPolyFromWKB(wkb[,srid])
MultiPolygonFromWKB(wkb[,srid])

Description

Constructs a MULTIPOLYGON value using its WKB representation and SRID.

MPolyFromWKB() and MultiPolygonFromWKB() are synonyms.

Examples

SET @g = ST_AsBinary(MPointFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))'));

SELECT ST_AsText(MPolyFromWKB(@g));
+---------------------------------------------------------------------------------------------------------------+
| ST_AsText(MPolyFromWKB(@g))                                                                                   |
+---------------------------------------------------------------------------------------------------------------+
| MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) |
+---------------------------------------------------------------------------------------------------------------+
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.

© 2021 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/mpolyfromwkb/