The opentripplanner package was originally developed to support OpenTripPlanner v1.3, and has been updated to support each subsequent release. OpenTripPlanner v2.0 is the next major release, and this vignette will document the changes within the package to support OpenTripPlanner v2.0. While most changes for v2.0 are improvements some, like the removal of the isochrone feature are not. So the package will continue to support both version 1.5 (the last v1.x) and subsequent v2.x releases. This vignette will be updated to help users select the best version for their needs.

Major Changes in 2.0

  • Switch from Java 8 to Java 11
  • Support for Netex transit data
  • Support for SIRI transit data
  • Switch from A* routing algorithum to Range Raptor when searching transit routes
  • Removal of Isochrone, Geocode, and other analysis features

Getting Java 11


At the time ow writing Java 8 is still the default on Windows. TO get Java 11 you must download the Java Development Kit this requires a free account with the Oracle website.

You will also need to change the PATH variaible in Windows to point to the new version of Java


Coming Soon


Coming Soon

Checking your Java version

You can check the version of Java accessible to R by using otp_check_java and specifing the version of OTP you want to use.

For example if you wanted to use OTP 2.0 but have Java 8 installed then you would see:

Building a graph and starting up OTP 2

You can select OTP 2.0 using the otp_dl_jar function.

# Path to a folder containing the OTP.jar file, change to where you saved the file.
path_data <- file.path(tempdir(), "OTP")
path_otp <- otp_dl_jar(version = "2.0.0")
# Build Graph and start OTP
log1 <- otp_build_graph(otp = path_otp, dir = path_data)
log2 <- otp_setup(otp = path_otp, dir = path_data)
otpcon <- otp_connect(timezone = "Europe/London")

We can download the demo data and build a graph in the usual way.