H3_GRID_DISTANCE

functionsupportedCore SQL functions

docs.snowflake.com ↗

Geospatial functions

Returns the distance between two H3 cells specified by their IDs.

Syntax

H3_GRID_DISTANCE( <cell_id_1> , <cell_id_2> )

Parameters

NameRequiredDescription
cell_id_1requiredAn INTEGER that represents the H3 cell ID (index), or a VARCHAR that represents the cell ID in hexadecimal format.
cell_id_2requiredAn INTEGER that represents the H3 cell ID (index), or a VARCHAR that represents the cell ID in hexadecimal format.

Returns

Returns the INTEGER value that represents the distance in grid cells between the two H3 cells.

Usage notes