All Products
Search
Document Center

ApsaraDB RDS:ST_GridLevelFromZ

Last Updated:Aug 02, 2023

This topic describes the ST_GridLevelFromZ function. This function calculates the height of a geographic grid based on the altitude.

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

This function calculates the height of the geographic grid based on the altitude and precision level of the grid.

Examples

SELECT ST_GridLevelFromZ(1005.8, 25);
 st_gridlevelfromz 
--------------
          597