Get the grid distance between two hex indexes. This function may failto find the distance between two indexes if they are very far apart oron opposite sides of a pentagon.

h3_distance(origin, destination)

Arguments

origin

H3Index Origin hexagon index

destination

H3Index Destination hexagon index

Value

Number - Distance between hexagons, or a negative number if the distance could not be computed