otp_make_surface | R Documentation |
Requires OTP 1.x and the analyst
otp_make_surface(
otpcon = NULL,
fromPlace = c(-1.17502, 50.6459),
mode = "CAR",
date_time = Sys.time(),
maxWalkDistance = 1000,
arriveBy = FALSE,
routeOptions = NULL,
timezone = otpcon$timezone,
ncores = 1
)
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 with CRS 4326 |
mode |
character vector of one or more modes of travel valid values TRANSIT, WALK, BICYCLE, CAR, BUS, RAIL, SUBWAY, TRAM, FERRY, 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 |
maxWalkDistance |
Numeric passed to OTP in metres |
arriveBy |
Logical, Whether the trip should depart or arrive at the specified date and time, default FALSE |
routeOptions |
Named list of values passed to OTP use |
timezone |
Character, what timezone to use, see as.POSIXct, default is local timezone |
ncores |
How many cores to use default = 1 |
THis function requires the analysis and pointset features to be enabled during 'otp_setup()'. Thus it will only work with OTP 1.x. For more detail see the analyst vignette.
Returns a list with information about the surface created
Other analyst:
otp_traveltime()
## Not run:
surface <- otp_make_surface(otpcon, c(-1.17502, 50.64590))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.