h3_to_children: Get the children/descendents of a given hexagon at a...

Description Usage Arguments Value Examples

View source: R/h3_algorithms2.R

Description

Get the children/descendents of a given hexagon at a particular resolution

Usage

1
h3_to_children(h3_index, res = NULL)

Arguments

h3_index

character vector representing H3 indexes

res

resolution; if NULL, the resolution will be set to h3_get_resolution(h3_index[1]) + 1

Value

character vector of H3 indexes; list of charactor vectors if multiple indexes are supplied

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
coords <- c(37.36156, -122.05532)

h3_index <- geo_to_h3(coords)

h3_to_children(h3_index) %>%
  h3_to_geo_boundary() %>%
  geo_boundary_to_sf() %>% plot()

h3_to_geo_boundary(h3_index) %>%
  geo_boundary_to_sf() %>% plot(add = TRUE)

crazycapivara/h3forr documentation built on Dec. 6, 2020, 5:21 a.m.