Teilen über


st_zmax-Funktion

Gilt für:check marked yes Databricks SQL check marked yes Databricks Runtime 17.1 and above

Important

Dieses Feature befindet sich in der Public Preview.

Hinweis

Dieses Feature ist in Databricks SQL Classic Warehouses nicht verfügbar. Weitere Informationen zu Databricks SQL Warehouses finden Sie unter SQL Warehouse-Typen.

Gibt die maximale Z-Koordinate des Eingabewerts GEOMETRY zurück oder NULL wenn die Geometrie leer ist oder keine Z-Koordinate aufweist.

Syntax

st_zmax ( geoExpr )

Arguments

  • geoExpr: Ein GEOMETRY Wert.

Returns

Ein Wert vom Typ DOUBLE, gleich der maximalen Z-Koordinate des Eingabewerts GEOMETRY .

Die Funktion gibt zurück NULL , wenn die Eingabe leer ist oder die Geometrie leer ist NULL oder keine Z-Koordinate aufweist.

Examples

-- Returns the maximum Z coordinate of a non-empty geometry with a Z coordinate.
> SELECT st_zmax(st_geomfromtext('LINESTRING Z (10 34 -1,44 57 -2,30 24 -5)'));
  -1.0
-- Returns `NULL` for a non-empty geometry without a Z coordinate.
> SELECT st_zmax(st_geomfromtext('LINESTRING(10 34,44 57,30 24)'));
  NULL