OpenTripPlanner has made rapid progress over the last few years and is now being used in production systems providing multi-modal itineraries to public transit riders, pedestrians, and cyclists around the world.
However, the routing engine at its core has the potential to answer much more general questions about efficient paths through the city. These possibilities are what originally drew me to OpenTripPlanner, and my primary role within the project is now expanding OTP’s range of applications beyond passenger information into the areas of spatial analysis, urban planning, accessibility research, and transportation engineering.
Many of these applications require very large batches of near-identical requests with the origin or destination taking on every value in some set. That set might be the centroids of census tracts when evaluating effects of a public transit service cut, the location of all real estate transactions over a given year in a housing price study, or a regular grid of cells or pixels in urban accessibility and travel time mapping applications.
At first glance, using OTP to find paths from some origin to thousands or millions of individual destinations seems like an excruciatingly slow process — and it would be if we adopted the naïve strategy of making the same request to the server over and over, changing only the destination each time. However, algorithms that find a shortest (a.k.a. lowest cost or “best”) path through a multi-modal transportation network produce a great deal of internal information that is discarded after only a few itineraries are returned to the user. With appropriate modifications this data about alternate paths can be retained and put to use in a variety of ways.
The OTP Analyst extension does just that. When finding an itinerary from point A to point B, many path search algorithms, from Edsger Dijkstra’s 1959 classic to it’s newer timetable-friendly variants, also produce paths to every point closer than B as a byproduct with no extra effort. By simply letting the algorithm run a little longer until the search reaches every corner of the graph, we obtain every shortest path branching out from a given origin point.
Taken together, all these paths form a “tree” rooted at a given departure point (or arrival point in the case of an arrive-by search). This data structure contains a lot of implicit information about the temporal landscape of the city as perceived from its root. We can for example calculate travel time to an arbitrary point within the geographic area covered by our OTP server by simply finding the closest segments in the street network, taking the perpendicular distance to those segments, and adding the travel time for the final leg to that given by the path tree. Travel time is then a function defined over a continuous 2D domain (a surface), and this function can be evaluated at any set of points specified by the user. Once computed, relationships between these points and neighboring streets can be cached, allowing results to be rapidly re-evaluated when some search parameter is changed.
The problem remains of how to meaningfully display or analyze all this information. Perhaps the most straightforward option is a map layer using colors or transparency to indicate travel times. In this case, the travel time function is simply evaluated at a regular grid of points corresponding to the individual pixels that make up a map in a particular projection. OpenTripPlanner exposes this method as a WMS service and a tile layer that can be overlayed on any standard base map.
As a demonstration of these capabilities, we have set up a demo at http://analyst.opentripplanner.org/opentripplanner-analyst-client/. Since the Analyst module was recently merged into OTP proper, all the usual trip planner parameters now apply to Analyst requests, including departure time, mode of transportation, and maximum walking distance. The screen capture below shows public transit travel time from a point in central Washington, DC, with each color band representing 30 minutes of travel time in the order green, blue, yellow, red. Note that these are not solid blocks of color — the travel time gradient is expressed to one-minute resolution by varying saturation within each band.
Multiple rasters can also be combined on the server side. A good example is the potential path area visualization, labeled “Hägerstrand” in the demo after the geographer who theorized it. Given an origin and destination place and time, it maps the remaining time to perform some activity along the route. This is essentially a 2.5D projection of Hägerstrand’s time/space prism onto the map surface. The image below shows the part of Washington, DC accessible to someone who must leave the green marker after 8:00 AM and arrive at the red marker before 9:30 AM via public transit. Greater transparency indicates a larger amount of time available to perform some activity at the intermediate location.
We are by no means limited to examining travel time. Any information accumulated in OTP State objects during the search is a candidate for display or analysis. For example, here is a map of the number of vehicles boarded in the lowest-cost path to each point in the Washington, DC area, starting from the New Carrollton station of the proposed Purple Line (but with service on that line disabled):

Number of vehicles boarded in lowest-cost paths to destinations in Washington, DC. (green:0, blue:1, yellow:2, red:3)
Over the coming months we will be identifying alternative metrics for transit quality of service and urban accessibility. The most effective ones will make their way into OTP Analyst. We are also not constrained to presenting our results as an image or on a regular grid. It is equally possible to substitute some other arbitrary set of endpoints from a shapefile or spatial database. As with map tiles, their relationships with streets are pre-computed, accelerating subsequent evaluations of the same points. The resulting data sets can be analyzed in external tools such as the open-source R statistical package.

Linear least-squares model for relative housing prices as a function of transit travel time from the city center. R-squared 0.20, p-value: < 2.2e16
The growing worldwide availability of open transit data in de facto standard formats means that once developed, spatial analysis tools can serve in both comparative and targeted studies in a large number of places. My hope is that besides enabling citizens to appropriate transportation planning methods and mobilize their resulting expertise in defense of the public interest and quality of life, the Analyst extensions to OpenTripPlanner will help the academic and planning communities to better grasp the syntax of the urban environment and factors favoring spatial legibility for those of us navigating it via shared, scheduled and non-motorized transport.









10 Comments
This is great stuff. Have you thought of drawing a heat map that shows the % of a region’s destinations that are accessible via a 45 transit ride from each parcel? This would show quickly, at a regional scale what areas are relatively more connected than an other.
Absolutely. This post concentrates on the basic Analyst web services, which provide travel time maps. Alongside the web services, I’ve been building out an Analyst batch framework which will perform a large number of searches and aggregate the results as cumulative opportunities measures in the way you describe (e.g. one per parcel). We’re working on a case study right now. Watch this space for an update in the near future, and thanks for your comments.
That’s just what I was hoping to hear. Several of us here at King County Metro (Seattle) have been interested in putting a team together for an Innovations Deserving Exploratory Analysis (IDEA) grant proposal (a Transportation Research Board program). We are interseted in an analysis tool that will help demonstrate how network changes would impact access as represented on such a heat map. Would it be possible to have a conversation with someone at OTP about such a possibility? How might I initate that contact?
Shunt5, if you’re reading this and still interested, we developed an open source 3D heat map generation tool as part of using OpenTripPlanner as an analyst tool before Analyst was developed. It can take a very simply formatted input file and generate the heat map. See slide 9 at http://www.noblis.org/NewsPublications/News/Documents/OrlandoWorldCongressAccessibilityDark.pdf for an example. Would love to talk.
Hi Andrew,
First, thanks much for all these great efforts.
OpenTripPlanner version 0.9.1 just recently released, we deployed is successfully. We also successfully deployed the OpenTripPlanner Analyst also. However, all the functionalities that have been mentioned regarding the OpenTripPlanner Analyst don’t work.
Is there any resource/documentation available that can be shared, so that we can find the steps that we are missing?
Thanks
Hello,
Are you trying to work with the Analyst web services (tile server and JS client) or the batch processor? You can find some documentation for both of them at:
https://github.com/openplans/OpenTripPlanner/wiki/Batch-Analyst
https://github.com/openplans/OpenTripPlanner/wiki/SettingUpAnalyst
The second one is rather short, but the Analyst web server setup should be that simple: add the client WAR to your servlet container, and uncomment the component-scan element that causes the Analyst components to be created. If you continue to have problems, please contact us on the opentripplanner-users Google group with a more detailed description of your problem (what exactly you mean by “deployed the OpenTripPlanner Analyst” and “don’t work”) and we’ll be happy to assist.
Thanks for your interest in the project,
Andrew Byrd
Hello,
Thanks for your quick response.
Here are the latest feedback that I received from the team.
We cloned the opentripplanner code through git repository using this url git://github.com/openplans/OpenTripPlanner.git .
We have found some errors in most of the modules of opentripplanner.
We added all modules to the tomcat server.
While running openttripplanner-webapp, opentripplanner-analyst-client modules it displays front-end code(html& javascript) only.
The back-end java code is not running.
In the console we observe spring bean exceptions .
We used another way to deploy the project
We created a war file for the opentripplnner, deployed the war file using the tomcat manager
With this also we got the front-end out put only.
We are trying to understand how to achieve the integration of modules.
We are running the maven build file and while building it shows some of the modules are skipped and fails to build the project.
Please let me know if you do have any additional questions.
Thanks,
Mazed
Hi,
For me it is impressing the fast response time of your queries.
I would like to know more about the tecnical part.
Are you using Dijkstra to determine the isochrones?
Do you apply some heuristics to analyze the network?
Do you perform some incremental computation that reuses information of previous calculations?
Is the data entirely in main memory?
Where do you store the results, how are they rendered?
best regards
Markus
Hello Markus,
Yes, the travel times to the nodes in the network are found using a variant of Dijkstra’s algorithm adapted to transit timetables. It tracks Pareto-optimal sets of paths (time, cost) rather than just the fastest path.
The OpenTripPlanner system does have some modules that provide heuristics and precalculation for point-to-point searches, but in this case we are just building a full tree outward from the origin.
I did some hand-optimizing where I inlined and combined some geometry calculations (linear referencing, distance) to fit our exact needs. This is one reason why it is possible to render the tiles so quickly.
There is a cache which holds recently calculated shortest path trees, so each tile or other image for the same search will reuse that tree. It is also possible to cache the intermediate calculations that associate tile pixels with nearby streets, but that takes a very large amount of memory. The calculations are now optimized enough to be done on the fly so we just cache the intermediate calculations for the N most recently used tiles. All data is in main memory.
I hope this answers your questions. Feel free to contact us on the opentripplanner-users or opentripplanner-dev Google group!
-Andrew
Hi Andrew,
thanks a lot for your precise answers. For sure I plan to test your opensource product.
cheers Markus
One Trackback
[...] look more and more like tools like urban and transport decision makers can use. One example is the recent work by OpenPlans experimenting with an analyst module built on top of the OpenTripPlanner project. An [...]