Returns the parent cell of each input cell. By default returns the immediate parent (one resolution coarser). Optionally target a specific coarser resolution.
Arguments
- cell
An a5_cell vector.
- resolution
Integer scalar target parent resolution, or
NULLfor the immediate parent.
Value
An a5_cell vector of parent cells.
Examples
cell <- a5_lonlat_to_cell(-3.19, 55.95, resolution = 10)
a5_cell_to_parent(cell)
#> <a5_cell[1]>
#> [1] 6344be0000000000
a5_cell_to_parent(cell, resolution = 5)
#> <a5_cell[1]>
#> [1] 6346000000000000