ST_Z

Name

ST_Z — Return the Z coordinate of the point, or NULL if not available. Input must be a point.

Synopsis

float ST_Z ( geometry a_point ) ;

Description

Return the Z coordinate of the point, or NULL if not available. Input must be a point.

This method implements the SQL/MM specification.

This function supports 3d and will not drop the z-index.

Examples

SELECT ST_Z(ST_GeomFromEWKT('POINT(1 2 3 4)'));
 st_z
------
	3
(1 row)