All Products
Search
Document Center

ApsaraDB RDS:ST_GridRing

Last Updated:Feb 28, 2024

This topic describes the ST_GridRing function. This function obtains all grids whose distance from the central H3 grid is equal to the specified distance k.

Syntax

setof h3grid ST_GridRing(h3grid start, integer k);

Parameters

Parameter

Description

origin

The central H3 grid.

k

The distance from the central H3 grid.

Examples

SELECT ST_GridRing(st_h3fromlatlng(25.1,123.1),5);

 st_griddisk
------------------------
 01010060170363C5BAF408
 01010066170363C5BAF408
 01010062170363C5BAF408
 01010063170363C5BAF408
 01010061170363C5BAF408
 ....
(31 rows)