This topic describes the ST_ZMax function. This function returns the maximum z coordinate on the bounding box of a Box2D object, Box3D object, or geometry object.
Syntax
float ST_ZMax(box3d aGeomorBox2DorBox3D);Parameters
| Parameter | Description |
|---|---|
| aGeomorBox2DorBox3D | The Box2D object, Box3D object, or geometry object that you want to specify. |
Description
- The parameters of the ST_ZMax function are defined to support only Box3D objects. However, the function supports auto-casting, which allows the function to process Box2D objects and geometry objects. However, if Box2D objects and geometry objects are represented by strings, the function does not support auto-casting and therefore cannot process Box2D objects or geometry objects.
- The ST_ZMax function supports 3D objects and does not delete z coordinates.
- The ST_ZMax function supports circular strings and curves.
Examples
Obtain the maximum z coordinate on the bounding box of a LineString object by using
the default parameter settings.
SELECT ST_ZMax('LINESTRING(0 1 2,3 4 5)'::geometry);
st_zmax
---------
5
(1 row)