Skip to main content
Version: 3.0

ST_GeometryFromText,ST_GeomFromText

Description

Converts a WKT (Well Known Text) to the corresponding memory geometry.

Syntax

GEOMETRY ST_GeometryFromText(VARCHAR wkt)

Examples

MySQL > SELECT ST_AsText(ST_GeometryFromText("LINESTRING (1 1, 2 2)"));
+---------------------------------------------------------+
| st_astext(st_geometryfromtext('LINESTRING (1 1, 2 2)')) |
+---------------------------------------------------------+
| LINESTRING (1 1, 2 2) |
+---------------------------------------------------------+

keyword

ST_GEOMETRYFROMTEXT,ST_GEOMFROMTEXT,ST,GEOMETRYFROMTEXT,GEOMFROMTEXT