Returns the maximum z-coordinate of 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. |
Usage notes
The parameter type is defined as
box3d, butST_ZMaxsupports auto-casting for Box2D and geometry objects. If a Box2D or geometry object is passed as a string, auto-casting does not apply and the function cannot process it.ST_ZMaxpreserves z-coordinates and does not drop them from 3D objects.ST_ZMaxsupports circular strings and curves.
Examples
Get the maximum z-coordinate of a LineString:
SELECT ST_ZMax('LINESTRING(0 1 2,3 4 5)'::geometry);
st_zmax
---------
5
(1 row)该文章对您有帮助吗?