MySQL tutorial: ST_GEOMCOLLFROMTEXT [EN]
top of page
CerebroSQL

MySQL: 

ST_GEOMCOLLFROMTEXT

ST_GeomCollFromText(wkt[, srid [, options]]),
ST_GeometryCollectionFromText(wkt[, srid [, options]]),
ST_GeomCollFromTxt(wkt[, srid [, options]])

Constructs a GeometryCollection value using its WKT representation and
SRID.

These functions handle their arguments as described in the introduction
to this section.

URL: https://dev.mysql.com/doc/refman/8.0/en/gis-wkt-functions.html

Example

mysql> SET @g = "MULTILINESTRING((10 10, 11 11), (9 9, 10 10))";
mysql> SELECT ST_AsText(ST_GeomCollFromText(@g));
+--------------------------------------------+
| ST_AsText(ST_GeomCollFromText(@g)) |
+--------------------------------------------+
| MULTILINESTRING((10 10,11 11),(9 9,10 10)) |
+--------------------------------------------+

bottom of page