This topic describes the ST_ZMin function. This function returns the minimum z coordinate on the bounding box of a Box2D object, Box3D object, or geometry object.

Syntax

float  ST_ZMin(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_ZMin 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_ZMin function supports 3D objects and does not delete z coordinates.
  • The ST_ZMin function supports circular strings and curves.

Examples

Obtain the minimum z coordinate on the bounding box of a LineString object by using the default parameter settings.
SELECT ST_ZMin('LINESTRING(0 1 2,3 4 5)'::geometry);
 st_zmin
---------
       2
(1 row)