Reads the index of a set written by a5_write_pyramid_set(),
set.json, without opening any shard. A renderer reads it first, then
the footers of the shards its view meets.
Value
A list of class a5pyramid_set_info:
path: the set's directory.format_version,generator,a5_crateanda5_index, as ina5_pyramid_info().data_resolution: the leaves' resolution.bbox:c(xmin, ymin, xmax, ymax)of every shard.columns: a tibble of the value columns'name,type,reducer,codec(seea5_pyramid();NAfor a column that stores its values) andsd, the standard deviation that scaled a"rep_child"column (1 where the leaves' standard deviation is 0 or undefined;NAfor other reducers and older files), anddim, the elements per cell of a vector column (NAfor scalar columns).tiers: a tibble with one row per tier:tier(from 0),lod_min,lod_max,shard_resolution,tile_size,row_group_size(NAfor one tile a row group), and itsshards,rowsandbytes.weights: the weights column every shard stores (a list of itsnameandtype), orNULL.shards: a tibble with one row per shard:tier,cell(the shard cell, an a5R::a5_cell),path(relative to the set's directory;NAfor a shard listed as empty, with no file),rows,tiles,bytes,footer_bytes(what a reader fetches to open it) andxmin,ymin,xmax,ymax; for a shard table, its writer's own columns follow, read with arrow where it is installed.metadata: the set's metadata, a named character vector.
See also
a5_pyramid_info() for one shard.
Examples
library(a5R)
centre <- a5_lonlat_to_cell(-3.19, 55.95, resolution = 10)
cells <- a5_uncompact(a5_spherical_cap(centre, 3000), resolution = 15)
dest <- tempfile()
a5_write_pyramid_set(data.frame(cell = cells, value = runif(length(cells))), dest)
a5_pyramid_set_info(dest)$tiers
#> # A tibble: 2 × 9
#> tier lod_min lod_max shard_resolution tile_size row_group_size shards rows
#> <int> <int> <int> <int> <int> <int> <int> <dbl>
#> 1 0 2 12 0 16384 NA 2 46
#> 2 1 13 15 3 16384 NA 1 1380
#> # ℹ 1 more variable: bytes <dbl>
