MPOLYFROMWKB()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Enterprise Server
Topics on this page:
Overview
See ST_
EXAMPLES
SET @mpoly = MPolyFromText('POLYGON((0 0,1 1,2 2,0 0),(1 2,2 3,3 4,1 2))');
SET @var = MPOLYFROMWKB(ST_AsWKB(@mpoly));
SELECT ST_AsText(@var);
+----------------------------------------------+
| ST_AsText(@var) |
+----------------------------------------------+
| POLYGON((0 0,1 1,2 2,0 0),(1 2,2 3,3 4,1 2)) |
+----------------------------------------------+
SET @mpoly='MULTIPOLYGON(((0 0,1 1,2 2,0 0),(1 2,2 3,3 4,1 2)),((1 1,2 2,3 3,1 1),(2 2,2 3,3 4,2 2)))';
SET @var = MPOLYFROMWKB(ST_AsWKB(MultiPolygonFromText(@mpoly)));
SELECT ST_AsText(@var);
+-------------------------------------------------------------------------------------------+
| ST_AsText(@var) |
+-------------------------------------------------------------------------------------------+
| MULTIPOLYGON(((0 0,1 1,2 2,0 0),(1 2,2 3,3 4,1 2)),((1 1,2 2,3 3,1 1),(2 2,2 3,3 4,2 2))) |
+-------------------------------------------------------------------------------------------+
CHANGE HISTORY
EXTERNAL REFERENCES
Additional information on this topic may be found in the MariaDB Public Knowledge Base.