Skip to contents

Indexing

Convert between coordinates and A5 cell indices.

a5_lonlat_to_cell() a5_cell_to_lonlat()
Convert between coordinates and cells

Cell type

The a5_cell vector type and helpers.

a5_cell() is_a5_cell() as_a5_cell()
A5 Cell Index Vector
as_a5_cell_list() unlist(<a5_cell_list>)
List of A5 cell vectors
a5_is_valid() a5_is_valid_cell()
Check that values are A5 cells
a5_u64_to_hex() a5_hex_to_u64()
Coerce between hex strings and A5 cell vectors
a5_migrate()
Migrate cell ids from the pre-1.0 index

Arrow & Parquet

Lossless conversion to and from Arrow arrays.

a5_cell_from_arrow() a5_cell_to_arrow()
Convert between a5_cell and Arrow uint64 arrays
a5_covering_from_arrow() a5_covering_to_arrow()
Convert between a5_covering and Arrow list<uint64> arrays
a5_to_arrow_table() a5_from_arrow_table()
Convert data frames with cell columns to and from Arrow tables

Hierarchy

Navigate the cell hierarchy across resolutions.

a5_get_resolution()
Get the resolution of A5 cell indices
a5_cell_to_parent() a5_cell_to_children()
Index parents and children
a5_cell_to_supercell() a5_cell_to_subcell()
Supercells and subcells: parents and children by location
a5_covering_to_supercells()
Supercells of a covering
a5_cell_child()
The i-th child of each cell
a5_cell_children_range()
Range of descendant cell ids
a5_get_res0_cells()
Get all resolution-0 root cells

Geometry & info

Cell boundaries, areas, counts, and distances.

a5_cell_to_boundary()
Get cell boundary polygons
a5_cell_to_boundary_xy()
Get cell boundary vertices as flat coordinate vectors
a5_cell_distance()
Distance between cell centroids
a5_cell_area() a5_cell_edge_length_avg() a5_get_num_cells() a5_get_num_children()
Cell size and counts by resolution

Traversal

Neighbourhood and distance-based cell selection.

a5_grid_disk()
Cells within k hops of a cell
a5_spherical_cap()
Cells within a great-circle radius

Coverings

Compacted sets of cells that record their resolution.

as_a5_covering() is_a5_covering() a5_covering_resolution()
A5 covering vectors
a5_covering_stored()
Stored cells of a covering
a5_compact() a5_uncompact()
Compact and uncompact sets of cells
a5_union() a5_intersect() a5_difference()
Combine coverings
a5_contains() a5_overlaps()
Test coverings
a5_count() a5_area()
Measure coverings

Geometry indexing

Convert polygons and linestrings to cells covering them.

a5_polygon_to_cells()
Cells inside or overlapping a polygon
a5_linestring_to_cells()
Cells traced by a great-circle linestring
a5_bbox()
Bounding box of polygons with great-circle edges

Configuration

Package information, thread control, error classes and the C API.

a5_info()
a5R build and session information
a5_set_threads() with(<a5_threads>) a5_get_threads()
Set the number of threads used by a5R
a5_errors
Error classes
a5_c_api
C API for other packages

wk integration

Methods for the wk geometry framework.

wk_handle(<a5_cell>) wk_crs(<a5_cell>)
wk methods for a5_cell