Skip to content

ST_ZMin

Returns the minimum Z coordinate of a geometry or geography’s bounding box.

Usage

double ST_ZMin(geom: geometry)
double ST_ZMin(geog: geography)

Arguments

  • geog (geography): Input geography
  • geom (geometry): Input geometry

Examples

SELECT ST_ZMin(ST_GeomFromWKT('LINESTRING Z (1 3 4, 5 6 7)'));
┌──────────────────────────────────────────────────────────────┐
│ st_zmin(st_geomfromwkt(Utf8("LINESTRING Z (1 3 4, 5 6 7)"))) │
│                            float64                           │
╞══════════════════════════════════════════════════════════════╡
│                                                          4.0 │
└──────────────────────────────────────────────────────────────┘
SELECT ST_ZMin(ST_GeogFromWKT('LINESTRING Z (1 3 4, 5 6 7)'));
┌──────────────────────────────────────────────────────────────┐
│ st_zmin(st_geogfromwkt(Utf8("LINESTRING Z (1 3 4, 5 6 7)"))) │
│                            float64                           │
╞══════════════════════════════════════════════════════════════╡
│                                                          4.0 │
└──────────────────────────────────────────────────────────────┘