Name

ST_Z — Returns the z coordinate of a point

Synopsis

double ST_Z(bytea Geometry);

Alias

Z

Description

Returns the Z coordinate of a point. If the Z coordinate is not available, returns Null. Input geometry must be a point, otherwise throws an error.

Coordinate Dimensions
2D3DM
Spatial Standards Support
OGC SFS for SQL. 1.1 (1999)OGC SFS for SQL. 1.1.0 (2005)OGC SFS for SQL. 1.2.0 (2006))SQL-MM Part 3
--7.2.9.26.1.5

Examples

SELECT ST_Z(ST_GeomFromEWKT('POINT(2 5 0 -8)'));
--Result
0

Related functions

ST_X, ST_Y, ST_M