Calculates the grid level of a geographic grid based on an altitude and precision level.
Syntax
bigint ST_GridLevelFromZ(float altitude, integer precision);Parameters
| Parameter | Description |
|---|---|
| altitude | The altitude in meters. |
| precision | The precision level of the geographic grid. Valid values: 1 to 32. |
Description
Returns the grid level of a geographic grid that corresponds to the given altitude and precision level.
Examples
SELECT ST_GridLevelFromZ(1005.8, 25);Output:
st_gridlevelfromz
------------------
597