a5_covering_stored: Stored cells of a covering

View source: R/covering.R

a5_covering_storedR Documentation

Stored cells of a covering

Description

Returns the cells a covering stores: its compacted cells, which have mixed resolutions, in curve order and without the compaction marker. Use them for index range queries. Each stored cell's descendants at the covering's resolution form one contiguous id range, given by a5_cell_children_range(), so a covering is the union of those ranges.

Usage

a5_covering_stored(x, simplify = TRUE)

Arguments

x

An a5_covering vector, or anything as_a5_covering() accepts.

simplify

Logical scalar. If TRUE (default), return one flat a5_cell vector with the stored cells of every covering in turn. If FALSE, return an a5_cell_list with one element per covering; a missing covering gives an empty element.

Details

The stored cells are index parents, not geometric ones: their outlines do not nest, so do not draw them or use them as an area. Use a5_uncompact() for the cells a covering stands for.

Value

An a5_cell vector, or an a5_cell_list if simplify = FALSE.

See Also

a5_uncompact() for the cells at the covering's resolution, a5_covering_resolution(), a5_cell_children_range().

Examples

cell <- a5_lonlat_to_cell(-3.19, 55.95, resolution = 8)
disk <- a5_grid_disk(cell, k = 3)
stored <- a5_covering_stored(disk)
a5_get_resolution(stored)

# one id range per stored cell, at the covering's resolution
a5_cell_children_range(stored, child_resolution = a5_covering_resolution(disk))

a5R documentation built on Oct. 19, 2026, 5:08 p.m.