barbeau edited this page Feb 28, 2013 · 139 revisions

OpenTripPlanner for Tampa

OpenTripPlanner (OTP) is an open source multi-modal trip planner.

This project contains modifications to OTP for a Tampa-specific deployment. Find the main OTP project at

Not a Developer?

If you want to help out the OTP deployment in Tampa, but you don't know Java from frappuccino, no worries! We still need your help mapping the Tampa Bay area in OpenStreetMap, since without good data, OTP can't give good directions. Check out our page for OpenStreetMap mapping project ideas, which has our most-wanted list of OSM improvements.

OTP Setup Shortcut for Tampa Developers

You'll need to follow the instructions for checking out the source given at the Developer Installation page on the main OTP wiki.

However, when checking out the code, instead of using the URI for the main OpenPlans repository when cloning the repository in Git, use the URI instead to grab the code from this repository, which is set up for the Tampa Bay area.

You'll need a graph (i.e., compiled OpenStreetMap, GTFS, and NED data) to use, so feel free to use the pre-compiled graph that includes HART and USF Bull Runner data from here for the Tampa area (note: the Graph.obj file is over 100MB, so download from a fast internet connection).

Make a directory on your hard drive off the root /OTPfiles/graph (e.g., if your running OTP off your C drive, the directory would be c:\OTPfiles\graph), and put the Graph.obj file from the above link in this directory.

Testing your instance

Open your browser and enter the URL http://localhost:8080/opentripplanner-webapp/ and press enter.

If all goes well, you should now have a working version of OTP on your computer that functions in Hillsborough County.

The OTP REST API should also be available at http://localhost:8080/opentripplanner-api-webapp/.

To query the API, use a RESTful request that looks something like this:,-82.410104&toPlace=28.059324,-82.415394&mode=TRANSIT,WALK&min=QUICK&maxWalkDistance=840&time=2:49%20pm&date=10/24/2012&arr=Depart&itinID=1&wheelchair=false

Building Your Own Graph

The above example includes a pre-compiled graph for the Tampa, Fl area. However, if you'd like to build your own graph, the full official directions for building an OTP graph are on the GraphBuilder page.

You can use the below graph-config.xml file to build a graph using GTFS data for HART and USF Bull Runner.


<?xml version="1.0" encoding="UTF-8"?>
  <beans xmlns="" xmlns:xsi=""
   xsi:schemaLocation="                 ">

  <bean id="gtfsBuilder" class="org.opentripplanner.graph_builder.impl.GtfsGraphBuilderImpl">
     <property name="gtfsBundles">
       <bean id="gtfsBundles" class="org.opentripplanner.graph_builder.model.GtfsBundles">
        <property name="bundles">
                 <!-- Here's all the GTFS URL's that we know of for Florida   
                            HART -
                            USF BullRunner -
                            Miami Dade -
                            Sarasota County Area Transit -
                            PSTA -
                            Space Coast Area Transit -
                            Lee County Transit -
                            Broward County - -->
                <bean class="org.opentripplanner.graph_builder.model.GtfsBundle">                        
                    <property name="url" value="" />
                    <property name="defaultAgencyId" value="HART" />
                    <property name="defaultBikesAllowed" value="true" />
            <!-- add additional GtfsBundles here -->
             <bean class="org.opentripplanner.graph_builder.model.GtfsBundle">
                    <property name="url" value="" />
                    <property name="defaultAgencyId" value="USF Bull Runner" />
                    <property name="defaultBikesAllowed" value="true" />

             <bean class="org.opentripplanner.graph_builder.model.GtfsBundle">
                    <property name="url" value="" />
                    <property name="defaultAgencyId" value="PSTA" />
                    <property name="defaultBikesAllowed" value="true" />
      <property name="gtfsGraphBuilders">
             <bean class="org.opentripplanner.graph_builder.impl.transit_index.TransitIndexBuilder"/> 

   <bean id="osmBuilder" class="org.opentripplanner.graph_builder.impl.osm.OpenStreetMapGraphBuilderImpl">
     <property name="provider">        
            <bean class="org.opentripplanner.openstreetmap.impl.AnyFileBasedOpenStreetMapProviderImpl"> 
                <property name="path" value="D:\OTPfiles\DownloadedOSMFiles\florida.osm\florida.osm"/> 

      <property name="customNamer">
        <bean class="org.opentripplanner.graph_builder.impl.osm.PortlandCustomNamer" />
      <property name="defaultWayPropertySetSource">
        <bean class="org.opentripplanner.graph_builder.impl.osm.DefaultWayPropertySetSource" />

    <bean id="transitStreetLink" class="org.opentripplanner.graph_builder.impl.TransitToStreetNetworkGraphBuilderImpl" />
     <bean id="nedBuilder" class="org.opentripplanner.graph_builder.impl.ned.NEDGraphBuilderImpl">
      <property name="gridCoverageFactory">
        <bean class="org.opentripplanner.graph_builder.impl.ned.NEDGridCoverageFactoryImpl">
          <property name="cacheDirectory" value="/OTPfiles/ned" />
    <bean class="org.opentripplanner.graph_builder.impl.CheckGeometryGraphBuilderImpl" id="checkGeometry"/>
    <bean class="" id="mapBuilder"/>

    <bean id="graphBuilderTask" class="org.opentripplanner.graph_builder.GraphBuilderTask">
      <property name="path" value="/OTPfiles/graph" /> 
      <property name="graphBuilders">
          <!-- GTFS comes before OSM, because we use the loaded set of stops to determine our OSM coverage -->
          <ref bean="gtfsBuilder" />
          <ref bean="osmBuilder" />
          <ref bean="mapBuilder"/>
          <ref bean="checkGeometry"/>           
          <ref bean="nedBuilder" />
          <ref bean="transitStreetLink" />

Deployment to

Our public instance of OpenTripPlanner is available at, and is running on the USF virtualized server

The OTP instance will need to be maintained in two ways:

  1. Build a new graph object (Graph.obj) from GTFS and OSM data whenever the current GTFS data expires
  2. Deploy new version of the OTP software (3 WAR files)

NOTE: It is highly recommended that you make a backup of the current Graph.obj file and current OTP WAR files before deploying new versions, so if anything goes wrong you can revert to the current versions.

For #1, you will need to build a graph using the opentripplanner-graph-builder project, which will produce a Graph.obj file. Then, remote desktop into and copy the new Graph.obj file into the directory D:\OTPfiles\graph. Then, go to the Windows Services view and stop the "Apache Tomcat 6" service, which will shut down the server and make the page at unavailable. Then, restart the service, and wait a few minutes for it to finish startup. The web page at should now be back up with the newly built graph.

For #2, you will need to update the OTP code and then export the opentripplanner-api-webapp, opentripplanner-geocoder, and opentripplanner-webapp projects, so you have 3 WAR files, one for each project. Remote desktop into and go to the Windows Services view and stop the "Apache Tomcat 6" service, which will shut down the server and make the page at unavailable. Then, delete the 3 current WAR files and their corresponding directories in the server folder D:\Tomcat6\webapps. Also delete the contents of D:\Tomcat6\webapps\ROOT. Then, copy the 3 new WAR files into the directory D:\Tomcat6\webapps. Then, restart the Windows Tomcat 6 service, and wait a few minutes for it to finish startup. Tomcat should automatically unzip the 3 WAR files into subdirectories in the D:\Tomcat6\webapps folder. Then, copy the contents of the folder D:\Tomcat6\webapps\opentripplanner-webapp to the folder D:\Tomcat6\webapps\ROOT, which will make the OTP webapp available at the root context. At this point, OTP should be back up and running when you browse to

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.