| a5_covering_from_arrow | R Documentation |
list<uint64> arraysLosslessly convert a5_covering vectors to and from Arrow
list<uint64> arrays, one list element per covering. Each element holds
the covering's compacted cells followed by its compaction marker, the
layout every A5 library uses, so the resolution travels with the data
into Parquet, DuckDB, Python or JavaScript. A missing covering is a null
element.
a5_covering_from_arrow(x)
a5_covering_to_arrow(x)
x |
For |
a5_covering_from_arrow() accepts coverings written by any A5 library.
Each one is checked, sorted and compacted; an element without a
compaction marker stands for the resolution of its finest cell.
a5_covering_from_arrow() returns an a5_covering vector.
a5_covering_to_arrow() returns an Arrow Array of type
list<uint64>.
a5_cell_to_arrow() for single cells.
cells <- a5_lonlat_to_cell(c(-3.19, 135), c(55.95, 0), resolution = 10)
disks <- a5_grid_disk(cells, k = 2)
arr <- a5_covering_to_arrow(disks)
arr$type$ToString()
identical(a5_covering_from_arrow(arr), disks)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.