Notes as part of OSSTIP on setting up OpenTripPlanner to do route-finding in Melbourne, and also display analytic information like IsoChrones. Initially done as work towards OSSTIP/WP4.

See also OSSTIP/Project blog#First tests of OpenTripPlanner for some results here ...

1) Initial install of OTP

I've found that the initial pre-built packages work OK for basic OTP routing on a local machine, and also display of some of the basic 'analyst' features like Travel time maps. I followed the 5 minute intro instructions on the OTP Wiki initially.

However, if you want to do more advanced 'batch analyst' functionality, this may mean installing the development version of OTP in an environment like Eclipse - see OSSTIP/Notes on getting OpenTripPlanner Analyst working.

Second main step was downloading and saving a copy of relevant OSM data. In my case, I grabbed this from 'Metro Extracts' website - http://web.archive.org/web/20161124220328/http://metro.teczno.com:80/ - was less than 50MB download but 200MB or so when unzipped. See OSSTIP/WP1#OpenStreetMap data for more info.

3) Prepare GTFS data

You need the GTFS data you intend to use ready to plug in to the OTP graph builder process.

OTP can refer to an online GTFS source, but it is likely to be faster if you can download this to the server you intend to run OTP from.

For Melbourne, we aren't able to publish the process we used to generate this data at this time. Hopefully in future there will be a simpler option to access this data which we are able to describe here.

4) Building the Melbourne routing network graph and start the server

As per instructions on https://github.com/openplans/OpenTripPlanner/wiki/FiveMinute, specify how to build the graph in the XML file, build it, then start the server.

relevant section of the Graph builder config file

In the case of Melbourne, we have 3 different GTFS files, for trains, trams, and buses. I think I also had to change the "URL" sections to "path" in the XML since they're all local files. See https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#example-2-using-multiple-local-gtfs-files for an example.

So in the GTFS specification section for Melbourne using all three GTFS files, my section looked like:

      <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">
<list>
<bean class="org.opentripplanner.graph_builder.model.GtfsBundle">
<property name="path" value="/Users/pds_phd/Dropbox/PhD-TechnicalProjectWork/OSSTIP_Common/GIS-Network-Data-Melb/GTFS-ExtractedData-201307/melb-train-gtfs.zip" />
<property name="defaultAgencyId" value="30" />
<property name="defaultBikesAllowed" value="true" />
</bean>
<bean class="org.opentripplanner.graph_builder.model.GtfsBundle">
<property name="path" value="/Users/pds_phd/Dropbox/PhD-TechnicalProjectWork/OSSTIP_Common/GIS-Network-Data-Melb/GTFS-ExtractedData-201307/melb-tram-gtfs.zip" />
<property name="defaultBikesAllowed" value="false" />
<property name="defaultAgencyId" value="32" />
</bean>
<bean class="org.opentripplanner.graph_builder.model.GtfsBundle">
<property name="path" value="/Users/pds_phd/Dropbox/PhD-TechnicalProjectWork/OSSTIP_Common/GIS-Network-Data-Melb/GTFS-ExtractedData-201307/melb-bus-gtfs.zip" />
<property name="defaultBikesAllowed" value="false" />
<property name="defaultAgencyId" value="34" />
</bean>
</list>
</property>
</bean>



and as suggested above, if you download a local copy of a Melbourne OSM file, then my section looked like this:

   <property name="provider">
<bean class="org.opentripplanner.openstreetmap.impl.AnyFileBasedOpenStreetMapProviderImpl">
<property name="path" value="/Users/Shared/GIS-Projects-General/OSM_Datasets/OSM-Melb-Large-FromMetroExtracts.osm" />
</bean>
</property>


https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder has more detail, in case we need to do more advanced stuff later on.

5) Open up the web applications to view/analyse results

Here's some relevant links I use while checking/working on the data, **with all the web applications installed and running locally - these won't work if you're running somewhere else**:

Page data
Authors Patrick Sunter 2013 CC-BY-SA-4.0 1,084 No main image Patrick Sunter (2013). "OSSTIP/Setup of OpenTripPlanner to display Melbourne PT network". Appropedia. Retrieved August 15, 2022.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.