Returns the maximum z coordinate on the bounding box of a Box2D, Box3D, or geometry object.
Syntax
float ST_ZMax(box3d aGeomorBox2DorBox3D)Parameters
| Parameter | Description |
|---|---|
| aGeomorBox2DorBox3D | The Box2D, Box3D, or geometry object. |
Description
ST_ZMax is defined to accept Box3D objects, but supports auto-casting for Box2D and geometry objects as well.
ST_ZMax does not accept string representations of Box2D or geometry objects. If Box2D objects and geometry objects are represented by strings, the function does not support auto-casting and therefore cannot process them.
Supports 3D objects and preserves z coordinates.
Supports circular strings and curves.
Examples
Get the maximum z coordinate from a geometry object:
SELECT ST_ZMax('LINESTRING(0 1 2,3 4 5)'::geometry);
st_zmax
---------
5
(1 row)