All Products
Search
Document Center

PolarDB:ST_MatchGridLevel

Last Updated:Mar 28, 2026

Returns the highest grid level supported by terrain elevation data based on its resolution.

Syntax

smallint ST_MatchGridLevel(raster dem)

Parameters

ParameterDescription
demThe terrain elevation raster in the Geodetic Coordinate System (GSC) 2000 coordinate system (EPSG:4490). To convert data in a different coordinate system, call ST_Transform before passing it to this function.

Description

ST_MatchGridLevel inspects the resolution of terrain elevation data and returns the highest grid level available for that data. When running path calculations, do not specify a grid level higher than the value returned by this function.

Examples

SELECT ST_MatchGridLevel(dem);

Result:

 21