ST_ZMax

更新时间:
复制 MD 格式

Returns the maximum z coordinate on the bounding box of a Box2D, Box3D, or geometry object.

Syntax

float ST_ZMax(box3d aGeomorBox2DorBox3D)

Parameters

ParameterDescription
aGeomorBox2DorBox3DThe 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)