Description Usage Arguments Value Examples
Parse [lat, lng] points to object of class sf
1 2 3 4 5 6 7 8 9 10 |
lat_lng_obj |
numeric vector or matrix with [lat, lng] points as returned
from h3_to_geo or h3_to_geo_boundary with |
object of class sf
(geometry type: POINT
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | coords <- c(37.3615593, -122.0553238)
h3_index <- geo_to_h3(coords, 7)
h3_indexes <- k_ring(h3_index)
# Single center point
h3_to_geo(h3_index) %>% geo_to_sf()
# Multiple center points
h3_to_geo(h3_indexes) %>% geo_to_sf()
# Boundary points (single hexagon)
h3_to_geo_boundary(h3_index, format_as_geojson = FALSE) %>%
geo_to_sf()
# Boundary points (multiple hexagons)
h3_to_geo_boundary(h3_indexes, format_as_geojson = FALSE) %>%
geo_to_sf()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.