ST_GridLevelFromZ

更新时间:
复制 MD 格式

Calculates the grid level of a geographic grid based on an altitude and precision level.

Syntax

bigint ST_GridLevelFromZ(float altitude, integer precision);

Parameters

ParameterDescription
altitudeThe altitude in meters.
precisionThe 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