Returns the hollow ring of H3 grids at exactly grid distance k from a central H3 grid.
Syntax
setof h3grid ST_GridRing(h3grid origin, integer k)Parameters
| Parameter | Type | Description |
|---|---|---|
origin | h3grid | The central H3 grid. |
k | integer | The grid distance from origin. |
Example
Get all H3 grids at distance 5 from the grid at coordinates (25.1, 123.1):
SELECT ST_GridRing(st_h3fromlatlng(25.1, 123.1), 5);Output:
st_griddisk
------------------------
01010060170363C5BAF408
01010066170363C5BAF408
01010062170363C5BAF408
01010063170363C5BAF408
01010061170363C5BAF408
....
(31 rows)