View source: R/h3_algorithms.R
cells_to_multipolygon | R Documentation |
This function returns geometry associated with a set of H3 cells, as a
single sfc_MULTIPOLYGON
.
cells_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 |
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
polygon_to_cells
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_disk(h3_address = bth_10, ring_size = 2) bth_patch_sf <- cells_to_multipolygon(bth_patch) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.