View source: R/h3_algorithms.R
compact | R Documentation |
This function compacts a set of cells of the same resolution into a set of cells across multiple resolutions that represents the same area.
compact(h3_addresses = NULL, simple = TRUE)
h3_addresses |
Character vector or list of 15-character indices
generated by H3 at a single resolution, generally the output of
|
simple |
Logical; whether to return a vector of outputs or a list object containing both inputs and outputs. |
A list of H3 cells with multiple resolutions. The minimum resolution of the output list matches the resolution of the input list.
## Not run: # Give me a compacted representation of County Ashe, NC nc <- sf::st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE) nc1 <- nc[1, ] nc1 <- sf::st_cast(nc1, 'POLYGON') fillers <- polygon_to_cells(geometry = nc1, res = 6) compacted <- compact(fillers) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.