OpenTripPlanner
A multimodal router for OpenStreetMap
David Turner
OpenPlans
Outline
Questions
Overview
Development
OSM features
Common problems
Future directions
Overview
Multimodal
Flexible
Accessible
Extensible
Free and Open Source
Analyst
Features
JSON and XML APIs
Routing backend
Analysis tools (travel time rasters)
Data sources
GTFS
OSM (or shapefiles)
NED
Development
Summer 2009: Development kicks off
Funding from TriMet
OpenPlans leads development
Volunteer developers from around the world
Dozens of deployments across roughly 100 regions
Back-end for several mobile transit apps
Soon: all North American metros with transit data
OSM
OTP supports numerous OSM features
Improving the map can improve routing
Comparing routing results against local knowledge can improve the map
Names and narrative
Street names come from:
name= (from ways and relations; best bet)
highway=, bridge=, tunnel=, service= (when street names are missing)
junction=roundabout (so that we can tell people to take the 3rd right)
note= or notes=
surface=unpaved, compacted, ground, dirt, earth, grass, mud (we give alerts)
Routeable ways
highway=* (except construction, proposed, conveyor, raceway)
railway=platform or public_transit=platform
Exceptions:
access=no or license
access=destination, private, customers, delivery, forestry, agricultural (start/end trip only)
Per-mode permissions
bicycle=yes, foot=yes, motorcar=no (also foot/bicycle=designated)
cycleway=dismount (OTP always allows dismounting, but this forces it)
oneway=true or -1
oneway:bicycle=-1 and bicycle:backwards, cycleway=opposite, cycleway:left=opposite or cycleway:right = opposite
highway=crossing or footway=crossing (does not circumvent turn restrictions)
Per-mode permissions, cont'd
Pedestrian-only unless bicycle=yes
highway=steps, platform
railway=platform, public_transit=platform
footway=sidewalk;highway=footway
Pedestrian and bicycle (unless otherwise specified)
highway=cycleway, path, pedestrian, footway, bridleway
Bike safety Model
Safety is modeled as a length multiplier
Values come from TriMet's interns
Bike safety Tags
OTP's bike safety model takes into account
highway=
cycleway=
surface=
bicycle=designated and RLIS/CCGIS:bicycle=caution_area
slope (from NED & ele tags)
Bike safety model snippet
setProperties(props, "highway=residential_link;cycleway=opposite", StreetTraversalPermission.ALL, 0.98, 0.98);
setProperties(props, "highway=tertiary;cycleway=opposite", StreetTraversalPermission.ALL, 1, 1);
setProperties(props, "highway=tertiary_link;cycleway=opposite", StreetTraversalPermission.ALL, 1, 1);
setProperties(props, "highway=secondary;cycleway=opposite", StreetTraversalPermission.ALL, 1.5, 1.71);
setProperties(props, "highway=secondary_link;cycleway=opposite", StreetTraversalPermission.ALL, 1.5, 1.71);
setProperties(props, "highway=primary;cycleway=opposite", StreetTraversalPermission.ALL, 2.06, 2.99);
setProperties(props, "highway=primary_link;cycleway=opposite", StreetTraversalPermission.ALL, 2.06, 2.99);
Bike safety model snippet 2
setProperties(props, "RLIS:bicycle=caution_area", StreetTraversalPermission.ALL, 1.45, 1.45, true);
setProperties(props, "RLIS:bicycle:right=caution_area", StreetTraversalPermission.ALL, 1.45, 1.0, true);
setProperties(props, "RLIS:bicycle:left=caution_area", StreetTraversalPermission.ALL, 1.0, 1.45, true);
setProperties(props, "CCGIS:bicycle=caution_area", StreetTraversalPermission.ALL, 1.45, 1.45, true);
setProperties(props, "CCGIS:bicycle:right=caution_area", StreetTraversalPermission.ALL, 1.45, 1.0, true);
setProperties(props, "CCGIS:bicycle:left=caution_area", StreetTraversalPermission.ALL, 1.0, 1.45, true);
Bike Safety, conclusion
> 400 lines
Room for improvement: lit=yes
Turn Restrictions
relation type=restriction
except=motorcar, bicycle
restriction=no_*_turn or only_*_turn
Coming soon: hour_on, hour_off, day_on, day_off
Turn Restrictions: example
Relation: 1694152
Tags:
type = restriction
restriction = only_straight_on
Members:
Way West Burnside Street (118756155) as to
Node 567256143 as via
Way West Burnside Street (128309208) as from
Elevation
Most elevation data from National Elevation Dataset (NED) rasters
NED is mapped to a weird datum
NED is ground-level, not bridge-level
bridge=yes or tunnel=yes: fill in elevation from connected nodes
OSM ele tags fill in gaps (e.g. bridges)
Demo
Wheelchair Accessibility
Wheelchair accessibility is a major priority for OTP
highway=stairs
wheelchair=no
wheelchair:description
Elevators
highway=elevator
level=#
layer=#
relation type=level_map
levels=
Areas
e.g. Pioneer Square
area=yes
relation type=multipolygon, area=yes
Uses
visibility graph
Areas: Piazza San Marco
Areas: Martinez, CA
Common Problems
Some areas have weird cracks or crannies, causing the area builder to fail
Bridge ends often fail to match up to NED data, leading to dips at the start/end of bridges
The sorts of errors found by KeepRight -- almost-junctions, floating islands, impossible angles, missing turn restrictions, etc
The usual issues that any router has -- streets not matching up with reality
OSM-GTFS connectivity issues around train stations: partially mapped stations can lead to floating islands
Micro-mapped buildings can lead to strange snapping
Future directions
Incorporate traffic signalization (stop lights, stop signs) and other node safety features into pedestrian routing.
Car routing: maxspeed:motorcar, maxspeed:forward, toll or toll:motorcar
Ferries from OSM (when there is sufficient data; need frequency, duration)
Questions
?
Epilogue