ST_X
Name
ST_X — Returns the X coordinate of a Point.
Synopsis
float
ST_X
(
geometry
a_point
)
;
Description
Return the X coordinate of the point, or NULL if not available. Input must be a point.
|
|
|
To get the minimum and maximum X value of geometry coordinates use the functions ST_XMin and ST_XMax . |
This method implements the SQL/MM specification.
SQL-MM 3: 6.1.3
This function supports 3d and will not drop the z-index.
Examples
SELECT ST_X('POINT(1 2 3 4)');
1
SELECT ST_Y(ST_Centroid('LINESTRING(1 2 3 4,1 1 1 1)'::geometry));
1.5
See Also
ST_Centroid , ST_GeomFromEWKT , ST_M , ST_XMax , ST_XMin , ST_Y , ST_Z