All Products
Search
Document Center

PolarDB:ST_MatchGridLevel

Last Updated:Mar 28, 2026

Returns the highest available grid level for a Digital Elevation Model (DEM) raster based on its resolution.

Syntax

smallint ST_MatchGridLevel(raster dem);

Parameters

ParameterDescription
demA raster containing terrain elevation data. The coordinate system must be Geodetic Coordinate System (GCS) 2000, EPSG:4490.

Usage notes

  • Do not use a grid level higher than the value returned by this function when performing path calculations.

  • If the input raster is not in EPSG:4490, convert it to EPSG:4490 first using ST_Transform.

Examples

SELECT ST_MatchGridLevel(dem);

Output:

 21

See also

  • ST_Transform — converts a raster to a different coordinate system