stplanr (version 0.6.2)

line2routeRetry: Convert straight spatial (linestring) object from flow data into routes retrying on connection (or other) intermittent failures

Description

Convert straight spatial (linestring) object from flow data into routes retrying on connection (or other) intermittent failures

Usage

line2routeRetry(lines, pattern = "^Error: ", n_retry = 3, ...)

Arguments

lines

A spatial (linestring) object

pattern

A regex that the error messages must not match to be retried, default "^Error: " i.e. do not retry errors starting with "Error: "

n_retry

Number of times to retry

...

Arguments passed to the routing function, e.g. route_cyclestreets()

Details

See line2route() for the version that is not retried on errors.

See Also

Other routes: line2route(), route_dodgr(), route_graphhopper(), route_local(), route_transportapi_public(), route()

Examples

Run this code
# NOT RUN {
data(flowlines)
rf_list <- line2routeRetry(flowlines[1:2, ], pattern = "nonexistanceerror", silent = F)
# }

Run the code above in your browser using DataLab