View source: R/otp-isochrone-batch.R
otp_isochrone | R Documentation |
Get the Isochrones from a location
otp_isochrone( otpcon = NA, fromPlace = NA, fromID = NULL, mode = "CAR", date_time = Sys.time(), arriveBy = FALSE, maxWalkDistance = 1000, routingOptions = NULL, cutoffSec = c(600, 1200, 1800, 2400, 3000, 3600), ncores = max(round(parallel::detectCores() * 1.25) - 1, 1), timezone = otpcon$timezone )
otpcon |
OTP connection object produced by otp_connect() |
fromPlace |
Numeric vector, Longitude/Latitude pair, e.g. 'c(-0.134649,51.529258)', or 2 column matrix of Longitude/Latitude pairs, or sf data frame of POINTS |
fromID |
character vector same length as fromPlace |
mode |
character vector of one or more modes of travel valid values TRANSIT, WALK, BICYCLE, CAR, BUS, RAIL, SUBWAY, TRAM, FERRY, BICYCLE_RENT, BICYCLE_PARK, CAR_PARK, CABLE_CAR, GONDOLA, FUNICULAR, AIRPLANE, default CAR. Not all combinations are valid e.g. c("WALK","BUS") is valid but c("WALK","CAR") is not. |
date_time |
POSIXct, a date and time, defaults to current date and time |
arriveBy |
Logical, Whether the trip should depart or arrive at the specified date and time, default FALSE |
maxWalkDistance |
maximum distance to walk in metres |
routingOptions |
named list passed to OTP see 'otp_routing_options()' |
cutoffSec |
Numeric vector, number of seconds to define the break points of each Isochrone |
ncores |
number of cores to use in parallel processing |
timezone |
character, timezone to use, default from otpcon |
Isochrones are maps of equal travel time, for a given location a map is produced showing how long it takes to reach each location.
Isochrones are only available from OTP v1.x and will not work with v2.0
Returns a SF data.frame of POLYGONs
Other routing:
otp_geocode()
,
otp_plan()
,
otp_pointset()
,
otp_routing_options()
,
otp_validate_routing_options()
## Not run: isochrone1 <- otp_isochrone(otpcon, fromPlace = c(-0.1346, 51.5292)) isochrone2 <- otp_isochrone(otpcon, fromPlace = c(-0.1346, 51.5292), mode = c("WALK", "TRANSIT"), cutoffSec = c(600, 1200, 1800) ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.