Package: a5R 1.0.0.9000

Hugh Graham

a5R: 'A5' Discrete Global Grid System

Bindings for the "A5 geospatial index" <https://a5geo.org/>. 'A5' partitions the Earth's surface into pentagonal cells across 31 resolution levels using an equal-area projection onto a dodecahedron. Provides functions for indexing coordinates to cells, traversing the cell hierarchy, computing cell boundaries, and compacting/uncompacting cell sets. Powered by the 'A5' 'Rust' crate via 'extendr'.

Authors:Hugh Graham [aut, cre], belian.earth [cph], Felix Palmer [ctb, cph], Authors of the dependency Rust crates [cph]

a5R_1.0.0.9000.tar.gz
a5R_1.0.0.9000.zip(r-4.7-x86_64)a5R_1.0.0.9000.zip(r-4.7-arm64)a5R_1.0.0.9000.zip(r-4.6-x86_64)a5R_1.0.0.9000.zip(r-4.6-arm64)a5R_1.0.0.9000.zip(r-4.5-x86_64)
a5R_1.0.0.9000.tgz(r-4.6-x86_64)a5R_1.0.0.9000.tgz(r-4.6-arm64)a5R_1.0.0.9000.tgz(r-4.5-x86_64)a5R_1.0.0.9000.tgz(r-4.5-arm64)
a5R_1.0.0.9000.tar.gz(r-4.7-arm64)a5R_1.0.0.9000.tar.gz(r-4.7-x86_64)a5R_1.0.0.9000.tar.gz(r-4.6-arm64)a5R_1.0.0.9000.tar.gz(r-4.6-x86_64)
a5R_1.0.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
a5R/json (API)

# Install 'a5R' in R:
install.packages('a5R', repos = c('https://belian-earth.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/belian-earth/a5r/issues

Pkgdown/docs site:https://belian-earth.github.io

On CRAN:

Conda:

rustcargo

8.43 score 30 stars 1 packages 36 scripts 648 downloads 57 exports 8 dependencies

Last updated from:89bfaa2227. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK154
linux-devel-x86_64OK191
source / vignettesOK269
linux-release-arm64OK142
linux-release-x86_64OK181
macos-release-arm64OK188
macos-release-x86_64OK541
macos-oldrel-arm64OK146
macos-oldrel-x86_64OK389
windows-devel-arm64OK333
windows-devel-x86_64OK261
windows-release-arm64OK287
windows-release-x86_64OK210
windows-oldrel-x86_64OK199
wasm-releaseOK139

Exports:a5_areaa5_bboxa5_cella5_cell_areaa5_cell_childa5_cell_children_rangea5_cell_distancea5_cell_edge_length_avga5_cell_from_arrowa5_cell_to_arrowa5_cell_to_boundarya5_cell_to_boundary_xya5_cell_to_childrena5_cell_to_lonlata5_cell_to_parenta5_cell_to_subcellsa5_cell_to_supercella5_compacta5_containsa5_counta5_covering_from_arrowa5_covering_resolutiona5_covering_storeda5_covering_to_arrowa5_covering_to_supercellsa5_differencea5_from_arrow_tablea5_get_num_cellsa5_get_num_childrena5_get_res0_cellsa5_get_resolutiona5_get_threadsa5_grid_diska5_grid_disk_vertexa5_hex_to_u64a5_infoa5_intersecta5_is_valida5_is_valid_cella5_line_string_to_cellsa5_linestring_to_cellsa5_lonlat_to_cella5_migratea5_overlapsa5_polygon_to_cellsa5_set_threadsa5_spherical_capa5_threadsa5_to_arrow_tablea5_u64_to_hexa5_uncompacta5_unionas_a5_cellas_a5_cell_listas_a5_coveringis_a5_cellis_a5_covering

Dependencies:cligluelifecycleRcpprlangunitsvctrswk

Working with Arrow and Parquet
The uint64 problem | The solution: a5_cell_from_arrow() and a5_cell_to_arrow() | Writing and reading Parquet | Storing coverings | Data written by a5R before 1.0 | How it works under the hood

Last update: 2026-10-16
Started: 2026-03-17

Coverings: sets of cells
What a covering stores | Building coverings | Measuring coverings | Combining coverings | Testing coverings | Drawing and joining | Storing coverings

Last update: 2026-10-16
Started: 2026-10-13

Getting started with a5R
Index a point | Cell boundaries | Hierarchy and compaction | Compact and uncompact | Traversal | Converting geometries to a5 cells | Tracing a line | Next steps

Last update: 2026-10-16
Started: 2026-02-18

How a5R stores cell IDs without strings
The problem | The solution: eight raw-byte fields | R-side: a vctrs record type | Why this matters | NA handling | Working with base R | Coverings | From compiled code | Summary

Last update: 2026-10-16
Started: 2026-03-17

Moving between resolutions by location
The index hierarchy is not spatially nested | Aggregating to a coarser grid | Expanding coarse cells | Which to use

Last update: 2026-10-16
Started: 2026-09-28

Multi-threading
Setting the thread count | What gets parallelised | When is it worthwhile? | Other parallel code

Last update: 2026-10-16
Started: 2026-03-04

Traversal and distance
Selecting cells around a point | Distance heatmap | Distance methods

Last update: 2026-10-16
Started: 2026-03-05

Readme and manuals

Help Manual

Help pageTopics
Bounding box of polygons with great-circle edgesa5_bbox
A5 Cell Index Vectora5_cell as_a5_cell is_a5_cell
The i-th child of each cella5_cell_child
Range of descendant cell idsa5_cell_children_range
Distance between cell centroidsa5_cell_distance
Convert between a5_cell and Arrow uint64 arraysa5_cell_from_arrow a5_cell_to_arrow
List of A5 cell vectorsa5_cell_list as_a5_cell_list unlist.a5_cell_list
Get cell boundary polygonsa5_cell_to_boundary
Get cell boundary vertices as flat coordinate vectorsa5_cell_to_boundary_xy
Compact and uncompact sets of cellsa5_compact a5_compaction a5_uncompact
Convert between coordinates and cellsa5_cell_to_lonlat a5_coordinates a5_lonlat_to_cell
A5 covering vectorsa5_covering a5_covering_resolution as_a5_covering as_a5_covering.a5_cell as_a5_covering.a5_cell_list as_a5_covering.a5_covering as_a5_covering.list is_a5_covering
Convert between a5_covering and Arrow list<uint64> arraysa5_covering_from_arrow a5_covering_to_arrow
Measure coveringsa5_area a5_count a5_covering_measures
Test coveringsa5_contains a5_covering_predicates a5_overlaps
Stored cells of a coveringa5_covering_stored
Supercells of a coveringa5_covering_to_supercells
Error classesa5_errors
Get all resolution-0 root cellsa5_get_res0_cells
Get the resolution of A5 cell indicesa5_get_resolution
Cells within k hops of a cella5_grid_disk a5_grid_disk_vertex
Index parents and childrena5_cell_to_children a5_cell_to_parent a5_hierarchy
a5R build and session informationa5_info
Check that values are A5 cellsa5_is_valid a5_is_valid_cell
Cells traced by a great-circle linestringa5_line_string_to_cells
Migrate cell ids from the pre-1.0 indexa5_migrate
Cells inside or overlapping a polygona5_polygon_to_cells
Cell size and counts by resolutiona5_cell_area a5_cell_edge_length_avg a5_get_num_cells a5_get_num_children a5_resolution_stats
Combine coveringsa5_difference a5_intersect a5_set_operations a5_union
Supercells and subcells: parents and children by locationa5_cell_to_subcells a5_cell_to_supercell a5_spatial_hierarchy
Cells within a great-circle radiusa5_spherical_cap
Get or set the number of threads used by a5Ra5_threads with.a5_threads
Convert data frames with cell columns to and from Arrow tablesa5_from_arrow_table a5_to_arrow_table
Coerce between hex strings and A5 cell vectorsa5_hex_to_u64 a5_u64_to_hex
wk methods for a5_cellwk_crs.a5_cell wk_handle.a5_cell wk_methods