Returns the distance between two H3 grid objects.
Syntax
integer ST_GridDistance(h3grid start, h3grid end);Parameters
| Parameter | Description |
|---|---|
start | The starting H3 grid object. |
end | The end H3 grid object. |
Return value
An integer representing the distance between two H3 grid objects.
Examples
SELECT ST_GridDistance(st_h3fromlatlng(25.1,123.1),st_h3fromlatlng(25.2,123.2));Output:
st_griddistance
-----------------
17096
(18 rows)