Returns the y coordinate of a point object.
Syntax
float ST_Y(geometry aPoint);Parameters
| Parameter | Description |
|---|---|
| aPoint | The point object to query. |
Usage notes
The input must be a point object.
Returns NULL if the input is unavailable or invalid.
Supports 3D point objects and preserves z coordinates.
Examples
SELECT ST_Y('POINT(0 1 2 3)'::geometry);
st_y
------
1
(1 row)The input POINT(0 1 2 3) has x=0, y=1, z=2, and m=3. ST_Y returns 1, which is the y coordinate.