Calculates the shortest path from an origin to a goal.
Usage
shortestPath(x, origin, goal, ...)
Arguments
x
TransitionLayer object
origin
SpatialPoints, vector or matrix with coordinates, at the moment only the first cell is taken into account
goal
SpatialPoints, vector or matrix with coordinates
...
Additional argument: output
Details
As an additional argument output, the desired output object can be specified: either “TransitionLayer” (default), “TransitionStack” or “SpatialLines”.
If there is more than one path either (1) transition values in the TransitionLayer get values of 1 / number of paths or (2) the SpatialLines object will contain more than one line.