R bindings for the A5 pentagonal geospatial index / discrete global grid system, powered by the a5 Rust crate via extendr.
Cell type
a5_cell()— construct cell ID vectorsis_a5_cell() — type test
a5_is_valid_cell() /
a5_is_valid()— validationa5_migrate()— convert ids from a5R before 1.0a5_u64_to_hex()/ a5_hex_to_u64() — hex string conversion
Indexing
a5_lonlat_to_cell()— coordinates to cell IDsa5_cell_to_lonlat()— cell IDs to centre coordinates
Geometry
a5_cell_to_boundary()— cell boundary polygons (WKB or WKT)a5_cell_to_boundary_xy()— cell boundary vertices as flat vectorsa5_cell_area()— cell area at a given resolutiona5_cell_edge_length_avg()— average cell edge length at a resolutiona5_cell_distance()— distance between cell centroidsa5_get_num_cells()— total cell count at a resolutiona5_get_num_children()— child count between resolutions
Hierarchy
a5_get_resolution()— extract resolution from cell IDsa5_cell_to_parent()— navigate to coarser cellsa5_cell_to_children()— navigate to finer cellsa5_cell_to_supercell()/ a5_cell_to_subcells() — move between resolutions by locationa5_get_res0_cells()— the 12 root cells
Coverings
a5_covering — compacted cell sets that record their resolution
a5_compact()/ a5_uncompact() — build and expand coveringsa5_covering_resolution() — the resolution a covering stands for
a5_covering_stored()— the compacted cells a covering storesa5_union()/ a5_intersect() / a5_difference() — combine coveringsa5_contains()/ a5_overlaps() — test coveringsa5_count()/ a5_area() — measure coverings
Traversal
a5_grid_disk()— neighbours by hop counta5_spherical_cap()— neighbours by great-circle distance
Geometry indexing
a5_polygon_to_cells()— cells inside (or overlapping) a polygona5_line_string_to_cells()— cells crossed by a great-circle polyline
Arrow & Parquet
a5_cell_from_arrow()/ a5_cell_to_arrow() — lossless conversion to/from Arrowuint64a5_covering_from_arrow()/ a5_covering_to_arrow() — coverings to/from Arrowlist<uint64>
Configuration
a5_threads()— multi-threading control
Vignettes
vignette("a5R")— getting startedvignette("coverings")— sets of cells: build, combine, test, measurevignette("spatial-hierarchy")— moving between resolutions by locationvignette("traversal-and-distance")— disks, caps and distancesvignette("multithreading")— parallel processingvignette("internal-cell-representation")— how cell IDs are storedvignette("arrow-parquet")— Arrow and Parquet interop
Author
Maintainer: Hugh Graham hugh@belian.earth
Authors:
Hugh Graham hugh@belian.earth
Other contributors:
belian.earth [copyright holder]
Felix Palmer (Author of the bundled 'a5' Rust crate) [contributor, copyright holder]
Authors of the dependency Rust crates (see LICENSE.note) [copyright holder]
