h3jsr (version 1.3.1)

get_disk: Get nearby H3 cell indices

Description

This function returns all the H3 cell indices within a specified number of steps from the index supplied.

Usage

get_disk(h3_address = NULL, ring_size = 1, simple = TRUE)

Value

By default, a list of length(h3_address). Each list element contains a character vector of H3 cells.

Arguments

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.

Examples

Run this code
# What are all the neighbours of this cell within two steps?
get_disk(h3_address = '86be8d12fffffff', ring_size = 2)

Run the code above in your browser using DataLab