Search the MySQL manual:

11.4.5.2 Fetching Spatial Data in WKT Format

The AsText() function provides textual access to geometry values. It converts a geometry from internal format into a WKT string.

mysql> SELECT AsText(g) FROM geom;
+-------------------------+
| AsText(p1)              |
+-------------------------+
| POINT(1 1)              |
| LINESTRING(0 0,1 1,2 2) |
+-------------------------+

User Comments

Add your own comment.