k_ring: Get all hexagons in a k-ring around the given center.

View source: R/h3_traversal.R

k_ringR Documentation

Get all hexagons in a k-ring around the given center.

Description

Get all hexagons in a k-ring around the given center.

Usage

k_ring(h3_index, radius = 1)

Arguments

h3_index

character vector of H3 indexes

radius

number of rings around the given center

Value

character vector of H3 indexes

Note

The order of the hexagons is undefined.

Examples

road_safety_greater_manchester[1, ] %>%
  geo_to_h3() %>%
  k_ring() %>%
  h3_to_geo_boundary_sf() %>%
  sf::st_geometry() %>%
  plot(col = "blue")

crazycapivara/h3-r documentation built on Aug. 10, 2022, 1:17 p.m.