Calculates distance from river locations (given as vectors of segment and
vertex) and the specified mouth of the river network. The mouth must first
be specified (see setmouth).
Whether or not to exit with an error if a route cannot be
found. If this is set to FALSE and a route cannot be found,
the function will return NA in the appropriate entry. Defaults to TRUE. See detectroute.
algorithm
Which route detection algorithm to use ("Dijkstra",
"sequential", or "segroutes"). If left as NULL (the
default), the function will automatically make a selection. See
detectroute for more details.