Skip to contents

Adds the partial rows (a5_pyramid_partials()) of every part of a region, cell by cell, and encodes each mean as a5_pyramid() does: the code of the mean of the lifted values. The rows of one LOD and key are one shard of the coarse levels, ready for a5_write_pyramid_level() (with ncell = "ncell" and the weights).

Usage

a5_pyramid_merge_partials(x, keys = NULL, threads = NULL)

Arguments

x

Partial rows: an Arrow Table, RecordBatchReader or Dataset (such as arrow::open_dataset() over the parts' Parquet files), with the schema metadata a5_pyramid_partials() writes. Batches are read one at a time, and only the rows of keys are kept.

keys

Optional a5R::a5_cell vector (or hex strings): merge only the rows of these keys, such as one shard's.

threads

Number of threads, or NULL (default) for a5pyramid_threads().

Value

An Arrow Table in ascending LOD, key and cell order: lod (uint8), key and cell (uint64), ncell (uint32), the summed weights in their stored type (named as the weights), and each vector's codes, a fixed-size list of its element type.