Releases: belian-earth/a5R
Releases · belian-earth/a5R
a5R 0.4.0
a5_grid()is soft-deprecated in favour ofa5_polygon_to_cells().
Calling it now emits alifecycle::deprecate_warn()with guidance: use
a5_polygon_to_cells()for geometry inputs (centre-in-polygon
containment), or pass awk::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), whereasa5_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 froma5_grid(), which uses
boundary-intersection semantics. Accepts wk-handleable geometries
(includingMULTIPOLYGONandsfcof several polygons), terra
SpatVectorobjects, numeric matrices, ordata.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 asa5_polygon_to_cells(),
includingMULTILINESTRING,sfcs of multiple linestrings, and
terraSpatVectorobjects; per-feature outputs are concatenated
with first-seen deduplication. - Bumped the embedded
a5Rust 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 incell_to_lonlat(a5 0.7.3), faster
cell_to_parent, and a polar-region spiral fix ingrid_diskand
spherical_cap. - Breaking:
a5_cell_to_lonlat()replaces itsnormaliseargument
withas_dataframe(defaultFALSE). WhenFALSE, centroids are
returned as awk::xy()vector with WGS 84 CRS; whenTRUE, as a
basedata.framewithlon/latcolumns. The previousnormalise
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_dataframemakes that explicit.
Defaults are unchanged for users who never setnormalise(still
returnswk::xy); explicitnormalise = TRUE/FALSEcalls now
error and must be updated. - New
lifecycledependency added toImports.
a5R 0.3.1
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_cellrepresentation and Arrow
integration. a5_cellinternal representation now uses 8 parallel raw byte vectors
instead of hex strings, reducing memory from ~80 bytes/cell to 8
bytes/cell (#12).a5_cellgainsvec_proxy_compare()andvec_proxy_order()methods,
enablingsort(),order(),unique(),duplicated(),match(),
and%in%(#12).a5_cellgains anis.na()method (#12).- New
a5_cell_from_arrow()anda5_cell_to_arrow()for lossless
conversion betweena5_celland Arrowuint64arrays, enabling
zero-copy Parquet I/O (#12). - New
a5_u64_to_hex()anda5_hex_to_u64()for explicit conversion
betweena5_cellvectors and hex strings. a5_is_cell()has been renamed toa5_is_valid()and now accepts
botha5_cellvectors and character hex strings.a5_cell_distance()anda5_cell_area()gain aunits = NULL
option to return plain numeric vectors withoutunitsclass
overhead.- New vignettes:
vignette("internal-cell-representation")and
vignette("arrow-parquet").
a5R 0.2.0
Initial CRAN release.