Топ-100
 
CerebroSQL

ST_ASTEXT

Database: MySQL

68747470733a2f2f7374796c65732e7265646469746d656469612e636f6d2f74355f32716d366b2f7374796c65

Topic

ST_AsText(g [, options]), ST_AsWKT(g [, options])

Converts a value in internal geometry format to its WKT representation
and returns the string result.

The function return value has geographic coordinates (latitude,
longitude) in the order specified by the spatial reference system that
applies to the geometry argument. An optional options argument may be
given to override the default axis order.

ST_AsText() and ST_AsWKT() handle their arguments as described in the
introduction to this section.

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

Example

mysql> SET @g = 'LineString(1 1,2 2,3 3)';
mysql> SELECT ST_AsText(ST_GeomFromText(@g));
+--------------------------------+
| ST_AsText(ST_GeomFromText(@g)) |
+--------------------------------+
| LINESTRING(1 1,2 2,3 3) |
+--------------------------------+