Топ-100
 

ST_ASTEXT

База данных: MySQL
Текст

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

Пример

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) |
+--------------------------------+