powered by
Returns the parent cell at a coarser resolution.
get_parent(cell_id, grid, levels = 1L)
Numeric vector of parent cell IDs
Numeric vector of cell IDs
A HexGridInfo or HexData object
Number of levels up (default 1)
grid <- hex_grid(resolution = 10) child_cells <- lonlat_to_cell(c(0, 10), c(45, 50), grid) parent_cells <- get_parent(child_cells, grid)
Run the code above in your browser using DataLab