Description
xrspatial.multi_stop_search routes a least-cost path through a sequence of waypoints, but it is not reachable from the .xrs DataArray accessor. The # ---- Pathfinding ---- section of the accessor delegates only a_star_search. So raster.xrs.a_star_search(...) works, but raster.xrs.multi_stop_search(...) does not, and callers have to drop back to the module-level function.
Proposed solution
Add a multi_stop_search delegation method to XrsSpatialDataArrayAccessor, mirroring the existing a_star_search method. The first positional argument is waypoints; everything else forwards as keyword arguments.
raster.xrs.multi_stop_search(waypoints, optimize_order=True)
DataArray-only, matching a_star_search (the Dataset accessor does not expose pathfinding).
Scope
- Accessor delegation method under the Pathfinding banner.
- Presence and functional-parity test in
test_accessor.py.
- Add
multi_stop_search to the pathfinding reference docs, which currently list only a_star_search.
The multi_stop_search implementation does not change. It is already public and in the README feature matrix.
Description
xrspatial.multi_stop_searchroutes a least-cost path through a sequence of waypoints, but it is not reachable from the.xrsDataArray accessor. The# ---- Pathfinding ----section of the accessor delegates onlya_star_search. Soraster.xrs.a_star_search(...)works, butraster.xrs.multi_stop_search(...)does not, and callers have to drop back to the module-level function.Proposed solution
Add a
multi_stop_searchdelegation method toXrsSpatialDataArrayAccessor, mirroring the existinga_star_searchmethod. The first positional argument iswaypoints; everything else forwards as keyword arguments.DataArray-only, matching
a_star_search(the Dataset accessor does not expose pathfinding).Scope
test_accessor.py.multi_stop_searchto the pathfinding reference docs, which currently list onlya_star_search.The
multi_stop_searchimplementation does not change. It is already public and in the README feature matrix.