All Products
Search
Document Center

PolarDB:ST_HasZ

Last Updated:Mar 28, 2026

Returns true if a geographic grid object contains a z coordinate (height or elevation), indicating a 3D grid.

Syntax

bool ST_HasZ(geomgrid gridcode);

Parameters

ParameterTypeDescription
gridcodegeomgridThe geographic grid object.

Example

The following example checks whether the grid code GZ0026206440 contains a z coordinate:

SELECT ST_HasZ(ST_GridFromText('GZ0026206440'));

Output:

 st_hasz
---------
 t

See also

  • ST_GridFromText — constructs a geographic grid object from a grid code string