Pathfinding#

Caution

A* allocates about 65 bytes per pixel and will raise MemoryError if the required memory exceeds 80 % of available RAM. Use Dask or set search_radius to limit the search area for large rasters.

Warning

NaN and non-positive friction values are treated as impassable barriers. Cells must have finite positive friction to be traversable.

A* Pathfinding#

xrspatial.pathfinding.a_star_search(surface, ...)

Calculate the least-cost path from a starting point to a goal through a surface graph, optionally weighted by a friction surface.