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.
Returns the X-coordinate of a Point geometry. This function extracts the horizontal coordinate value as a double-precision number.
SET @pt = 'Point(56.7 53.34)';
SELECT X(GeomFromText(@pt));
+----------------------+
| X(GeomFromText(@pt)) |
+----------------------+
| 56.7 |
+----------------------+Returns the Y-coordinate of a Point geometry. This function extracts the vertical coordinate value as a double-precision number.
SET @pt = 'Point(56.7 53.34)';
SELECT Y(GeomFromText(@pt));
+----------------------+
| Y(GeomFromText(@pt)) |
+----------------------+
| 53.34 |
+----------------------+Synonym for ST_Y. Returns the Y-coordinate value of a Point geometry as a double-precision number.
A synonym for ST_Y.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_X. Returns the X-coordinate value of a Point geometry as a double-precision number.
A synonym for ST_X.
This page is licensed: CC BY-SA / Gnu FDL