Documentation Index
Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
Use this file to discover all available pages before exploring further.
return result of h3 function gridDistance(cel1, cell2).
As described by H3 documentation
Finding the distance can fail because the two indexes are not comparable (different resolutions), too far apart, or are separated by pentagonal distortion. This is the same set of limitations as the local IJ coordinate space functions.
In this case, Sedona use in-house implementation of estimation the shortest path and return the size as distance.
Signatures
ST_H3CellDistance(cell1: Long, cell2: Long)
Parameters
Return type
Example
select ST_H3CellDistance(ST_H3CellIDs(ST_GeomFromWKT('POINT(1 2)'), 8, true)[0], ST_H3CellIDs(ST_GeomFromWKT('POINT(1.23 1.59)'), 8, true)[0])
+-----------------------------------------------------------------------------------------------------------------------------------------+
|st_h3celldistance(st_h3cellids(st_geomfromwkt(POINT(1 2), 0), 8, true)[0], st_h3cellids(st_geomfromwkt(POINT(1.23 1.59), 0), 8, true)[0])|
+-----------------------------------------------------------------------------------------------------------------------------------------+
| 78|
+-----------------------------------------------------------------------------------------------------------------------------------------+
