SDO_UTIL.H3_GRID_DISTANCE

Format

SDO_UTIL.H3_GRID_DISTANCE(
      h3_key_1 IN RAW,
      h3_key_2 IN RAW
) RETURN NUMBER;

Description

Provides the grid distance between two cells.

Grid distance is the minimum number of hops across adjacent cells needed to move from one H3 cell to the other.

Parameters

h3_key_1

The origin H3 cell.

h3_key_2

The destination H3 cell.

Usage Notes

The two cells must be comparable, that is, having the same resolution.

Examples

The following example returns the grid distance between two H3 cells:

SELECT SDO_UTIL.H3_GRID_DISTANCE(
         '080F3FFFFFFFFFFF',
         '0804FFFFFFFFFFFF')
FROM DUAL;