-
Notifications
You must be signed in to change notification settings - Fork 3
Install
Note: OpenTripPlanner is still very early in its development and is not yet ready for general use. These instructions are geared towards developers who want to set up a development environment using Eclipse. If you'd prefer to work exclusively from the command line, check out GettingStartedMaven.
This set of tutorials is designed to guide you through the process of getting started with OpenTripPlanner. After you have followed these instructions, you will have a development environment for OpenTripPlanner set up and will also be able to do rudimentary multi-modal trip planning using the web UI.
Most of these instructions are dedicated to getting the various development tools installed and configured properly. If you're an Eclipse wizard or already have some of these tools installed, you'll be able to skip some of these steps. However, unless you have a significant amount of experience developing Java web applications using Eclipse, Maven, and Tomcat, it's recommended that you follow these instructions all the way through to make sure you get set up properly.
Before we start, a quick and very high-level overview of what we're going to do.
-
Install Eclipse along with several plugins that will make development much easier. We will also install and configure Tomcat, which we will run inside of Eclipse to test out the OpenTripPlanner API and web front-end.
-
Use the
opentripplanner-graph-builder
utility to compile a graph using your GTFS data.opentripplanner-graph-builder
will use the locations of the stops in your GTFS data to automatically download OpenStreetMap data for the regions directly around those stops. -
Run
opentripplanner-api-webapp
(the RESTful web service) andopentripplanner-webapp
(the web front-end) and test out the trip planner.
The first thing you will need to do is make sure you have Eclipse installed as well as the M2Eclipse and Subclipse plugins for Maven and Subversion support inside of Eclipse. You can do this by following the GettingStartedEclipse tutorial. Note: Since we'll be testing out the web components of the project, you'll want to install the optional Web Standards Tools, as described in .
The next thing you need to do is install the Tomcat servlet container and set it up to run inside of Eclipse. Follow the instructions on , making sure to add both the opentripplanner-api-webapp
and the opentripplanner-webapp
project modules to the server. Don't worry about starting the server yet, we'll do that in a later step.
You can learn more about the opentripplanner-graph-builder
module on the GraphBuilder page. For the purposes of this tutorial, you need to create a graph-config.xml
file based on this sample file, updating the path to the GTFS zip file to the be correct for the data you want to use. You will also need to update the path to where you want to write the compiled graph. If you are on Windows, you will also need to change the cacheDirectory
path used to store the OpenStreetMap data to something other than /tmp/osm
.
Now, select the opentripplanner-graph-builder
project inside of Eclipse and choose Run -> Run Configurations. Create a new Java Application configuration .
Under the Arguments tab, put the path to the graph-config.xml
file you just created in the text area labeld Program arguments. You will also likely want to increase the amount of RAM allocated for the Java VM. To do this, add the following under VM arguments: -Xmx1024m
(this will allow the Java VM to consume up to 1GB before running out of space). Run this configuration and go grab a cup of coffee while OpenTripPlanner downloads the appropriate OSM data and compiles the graph.
The last thing you need to do is configure and run the web app in Eclipse. See or RunningTheWebappInTomcat.
Having problems getting your own instance of OpenTripPlanner up and running? Check out the section to see if there's a known fix for your problem.
For a list of all tutorials, see Tutorials.
Todo - create binary releases of OTP Releases