Skip to content

ST_ZMax

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

Usage

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

Arguments

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

Examples

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