Learn about POINT properties in MariaDB Server. This section details SQL functions for retrieving attributes of point spatial objects, such as their X and Y coordinates.
Synonym for ST_X. Returns the X-coordinate value of a Point geometry as a double-precision number.
Synonym for ST_Y. Returns the Y-coordinate value of a Point geometry as a double-precision number.
SET @pt = 'Point(56.7 53.34)';
SELECT X(GeomFromText(@pt));
+----------------------+
| X(GeomFromText(@pt)) |
+----------------------+
| 56.7 |
+----------------------+SET @pt = 'Point(56.7 53.34)';
SELECT Y(GeomFromText(@pt));
+----------------------+
| Y(GeomFromText(@pt)) |
+----------------------+
| 53.34 |
+----------------------+