View source: R/h3_algorithms.R
get_disk | R Documentation |
This function returns all the H3 cell indices within a specified number of steps from the index supplied.
get_disk(h3_address = NULL, ring_size = 1, simple = TRUE)
h3_address |
Character; 15-character cell index generated by H3. |
ring_size |
Character; number of steps away from the central cell. Defaults to 1. |
simple |
Logical; whether to return a vector of outputs or a data frame containing both inputs and outputs. |
By default, a list of length(h3_address)
. Each list element
contains a character vector of H3 cells.
The number of cells returned for each input index conforms to the
centered
hexagonal number sequence, so at ring_size = 5
, 91 addresses are
returned. The first address returned is the input address, the rest follow
in a spiral anticlockwise order.
# What are all the neighbours of this cell within two steps? get_disk(h3_address = '86be8d12fffffff', ring_size = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.