- Categories:
H3_ GRID_ DISK¶
Returns an array of the IDs of the H3 cells that
are within the specified grid distance (k_value) of the given cell. The grid distance, often written as k in the H3
model, is the number of steps between cells in the H3 grid. The IDs in the returned ARRAY are INTEGER values (if an INTEGER
value was provided as the input ID) or VARCHAR values containing the hexadecimal IDs (if a hexadecimal ID was provided
as the input ID).
Syntax¶
Arguments¶
cell_idAn INTEGER that represents the H3 cell ID (index), or a VARCHAR that represents the cell ID in hexadecimal format.
k_valueAn INTEGER that represents the grid distance
k: the number of steps between cells in the H3 grid. You must specify a non-negative value. For example,0returns only the specified cell, and1returns that cell plus its immediate neighbors.
Returns¶
Returns an ARRAY of the IDs of H3 cells that are within the distance k_value from the cell specified by
cell_id. The IDs are in one of the following formats:
- If
cell_idis an INTEGER value, the function returns the IDs as INTEGER values. - If
cell_idis a VARCHAR value containing the hexadecimal ID, the function returns the hexadecimal IDs as VARCHAR values.
Examples¶
The following example returns an ARRAY of the IDs of H3 cells within the grid distance of 1 from the cell with the ID
617540519050084351 (specified as an INTEGER value).
The following example returns an ARRAY of the IDs of H3 cells within the grid distance of 1 from the cell with the ID
891f1d48863ffff (specified as a VARCHAR value).