Name

ST_HasZ — Checks if a geometry has a Z dimension.

Synopsis

boolean ST_HasZ(geometry geom);

Descrizione

Checks if the input geometry has a Z dimension and returns a boolean value. If the geometry has a Z dimension, it returns true; otherwise, it returns false.

Geometry objects with a Z dimension typically represent three-dimensional (3D) geometries, while those without it are two-dimensional (2D) geometries.

This function is useful for determining if a geometry has elevation or height information.

Availability: 3.5.0

Questa funzione supporta il 3d e non distrugge gli z-index.

Questa funzione supporta le coordinate M.

Esempi

SELECT ST_HasZ(ST_GeomFromText('POINT(1 2 3)'));
 --result
 true
SELECT ST_HasZ(ST_GeomFromText('LINESTRING(0 0, 1 1)'));
 --result
 false

Si veda anche

ST_Zmflag

ST_HasM