Skip to contents

a5R 0.4.0

  • a5_grid() is soft-deprecated in favour of a5_polygon_to_cells(). Calling it now emits a lifecycle::deprecate_warn() with guidance: use a5_polygon_to_cells() for geometry inputs (centre-in-polygon containment), or pass a wk::rct() bounding box for the bbox use case. Note that the two functions are not semantically identical: a5_grid() uses boundary intersection (any cell touched by the geometry), whereas a5_polygon_to_cells() uses centre-point containment (cells whose centroid lies inside).
  • New a5_polygon_to_cells() returns the A5 cells whose centres lie inside a polygon. Distinct from a5_grid(), which uses boundary-intersection semantics. Accepts wk-handleable geometries (including MULTIPOLYGON and sfc of several polygons), terra SpatVector objects, numeric matrices, or data.frame(lon, lat). Multi-part inputs are handled natively: per polygon part the outer ring’s cells are computed and any hole-ring cells are subtracted, then the results are unioned across parts and recompacted.
  • New a5_linestring_to_cells() returns the A5 cells whose pentagons are intersected by a great-circle polyline, in discovery order along the path. Accepts the same input shapes as a5_polygon_to_cells(), including MULTILINESTRING, sfcs of multiple linestrings, and terra SpatVector objects; per-feature outputs are concatenated with first-seen deduplication.
  • Bumped the embedded a5 Rust crate from 0.7.0 to 0.8.0. Transparent improvements inherited from upstream: resolution-30 (de)serialisation (a5 0.7.1), neighbour functions at resolutions 0 and 1 (a5 0.7.2), longitude normalisation in cell_to_lonlat (a5 0.7.3), faster cell_to_parent, and a polar-region spiral fix in grid_disk and spherical_cap.
  • Breaking: a5_cell_to_lonlat() replaces its normalise argument with as_dataframe (default FALSE). When FALSE, centroids are returned as a wk::xy() vector with WGS 84 CRS; when TRUE, as a base data.frame with lon/lat columns. The previous normalise argument toggled longitude normalisation, but upstream a5 (>= 0.7.3) always returns normalised longitudes, so the flag’s effective job collapsed to “what container?”. as_dataframe makes that explicit. Defaults are unchanged for users who never set normalise (still returns wk::xy); explicit normalise = TRUE/FALSE calls now error and must be updated.
  • New lifecycle dependency added to Imports.

a5R 0.3.1

CRAN release: 2026-03-26

  • a5_cell() now requires hex strings to be exactly 16 characters, preventing silent construction of wrong cells from truncated input.
  • Improved vignettes covering the new a5_cell representation and Arrow integration.

a5R 0.3.0

a5R 0.2.0

CRAN release: 2026-03-16

  • Initial CRAN submission.