Skip to content

Expose multi_stop_search on the .xrs DataArray accessor #3563

Description

@brendancol

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiAPI design and consistencyarea:pathfindingArea: pathfindingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions