All pages
Powered by GitBook
1 of 5

Loading...

Loading...

Loading...

Loading...

Loading...

Point Properties

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.

ST_X

Returns the X-coordinate of a Point geometry. This function extracts the horizontal coordinate value as a double-precision number.

Syntax

ST_X(p)
X(p)

Description

Returns the X-coordinate value for the point p as a double-precision number.

ST_X() and X() are synonyms.

Examples

This page is licensed: GPLv2, originally from

SET @pt = 'Point(56.7 53.34)';

SELECT X(GeomFromText(@pt));
+----------------------+
| X(GeomFromText(@pt)) |
+----------------------+
|                 56.7 |
+----------------------+
fill_help_tables.sql

ST_Y

Returns the Y-coordinate of a Point geometry. This function extracts the vertical coordinate value as a double-precision number.

Syntax

ST_Y(p)
Y(p)

Description

Returns the Y-coordinate value for the point p as a double-precision number.

ST_Y() and Y() are synonyms.

Examples

This page is licensed: GPLv2, originally from

SET @pt = 'Point(56.7 53.34)';

SELECT Y(GeomFromText(@pt));
+----------------------+
| Y(GeomFromText(@pt)) |
+----------------------+
|                53.34 |
+----------------------+
fill_help_tables.sql

Y

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

X

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