Returns the A5 cells at resolution whose pentagons are intersected by
the great-circle polyline connecting the supplied waypoints. Output is
uncompacted, in discovery order along the path, with duplicates removed
first-seen. Multi-feature inputs (a MULTILINESTRING or an sfc of
multiple linestrings) are handled natively: per-feature cell sequences
are concatenated in feature order with first-seen deduplication.
Arguments
- x
A linestring-like geometry. One of:
Any geometry handleable by
wk::wk_handle()containing one or moreLINESTRING/MULTILINESTRINGfeatures.A
SpatVectorof linestrings (requires theterrapackage).A two-column numeric matrix (
cbind(lon, lat)) of waypoints.A
data.framewith columnslonandlat.
- resolution
Integer scalar target resolution (0–30).
Value
An a5_cell vector at resolution.
Details
Consecutive waypoints are connected by great-circle arcs (not rhumb lines or planar segments), so antimeridian-crossing paths work transparently when written in unwrapped lon/lat.
Matrix and data.frame inputs are treated as a single linestring;
for multi-feature data, pass an sf, sfc, wk, or SpatVector
geometry instead.
