Get geometry for a set of H3 cells
This function returns geometry associated with a set of H3 cells, as a single 'sfc_MULTIPOLYGON'.
set_to_multipolygon(h3_addresses = NULL, simple = TRUE)
h3_addresses |
Character vector or list of 15-character cell indices generated by H3. |
simple |
Logical; whether to return an 'sfc_MULTIPOLYGON' or an 'sf' object including the input cells. |
By default, object of type 'sfc_MULTIPOLYGON' of length 1.
The geometry returned by this function will not be valid where the addresses supplied overlap at the same resolution. The main use case for this function appears to be visualising the outputs of 'polyfill()' and 'compact()'.
## Not run: # Give me the outline of the cells around Brisbane Town Hall at # resolution 10 (not run as slow-ish) bth <- sf::st_sfc(sf::st_point(c(153.023503, -27.468920)), crs = 4326) bth_10 <- point_to_h3(bth, res = 10) bth_patch <- get_kring(h3_address = bth_10, ring_size = 2) bth_patch_sf <- set_to_multipolygon(bth_patch) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.