This topic describes the ST_Z function. This function returns the z coordinate of a point object.
Syntax
float ST_Z(geometry aPoint);
Parameters
Parameter | Description |
---|---|
aPoint | The point object that you want to specify. |
Description
- The object that you specify must be a point object.
- If the object that you specify is unavailable or invalid, the ST_Z function returns NULL.
- The ST_Z function supports 3D objects and does not delete z coordinates.
Examples
SELECT ST_Z('POINT(0 1 2 3)'::geometry);
st_z
------
2
(1 row)