H3's documentation states that the H3_distance() function returns "The distance between two H3 cells, expressed as the minimum number of hexagon 'steps' required to get from the origin to the destination." For example, this:

select h3_distance(647993701507408169,647993701464496713)



I'd like to convert that result to km in the same SQL statement, but haven't been able to find an existing function or documentation with instructions how. H3 includes some information on how the hexagons' sizes map to resolution, but the distance/'steps' equivalents to km aren't available.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.