SoTM US Routing


Published on

Presentation to State of the Map US, focusing on routing using OSM data.

Published in: Technology
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Big day today… Developers of this project here at SotM – great talent, know mapping at scale, please talk to them
  • A look at the recent redesign Single-page interface, one-box search
  • 50 million users
  • 50 million users
  • SoTM US Routing

    1. 1. MapQuest Routing using OSM Data David Nesbitt MapQuest, Inc.
    2. 2. <ul><li>Part of AOL Local </li></ul><ul><li>Along with Patch and City’s Best </li></ul><ul><li>First popular dynamic web application </li></ul><ul><li>#2 in Online Mapping in the U.S. </li></ul><ul><li>50 million unique visitors per month </li></ul><ul><li>Lack of investment in recent years </li></ul><ul><ul><li>But that is changing! </li></ul></ul><ul><li>Recently launched major redesign at </li></ul><ul><li> </li></ul>
    3. 3. Mapquest and OSM <ul><li>MapQuest UK launched at SOTM in Girona </li></ul><ul><li>UK site first: </li></ul><ul><li>Will launch Germany and France shortly </li></ul><ul><li>MapQuest France is next </li></ul><ul><li>New technology stack (for MapQuest) </li></ul><ul><li>Mapnik, TileCache, Nominatim, OSM data </li></ul><ul><li>Routing still uses proprietary engine </li></ul><ul><li>Established $1MM internal fund for OpenStreetMap investment </li></ul><ul><li>Focus: improve data within the United States </li></ul><ul><li>Use resources from MapQuest and Patch to engage audiences to contribute </li></ul><ul><li>Paying developers to contribute to open source projects </li></ul><ul><li>Contact us at [email_address] with questions or comments </li></ul>
    4. 5. MapQuest Routing using OSM Data <ul><li>1) We have ingested OSM data into our routing engine </li></ul><ul><li>Deploying sites in Europe with OSM routing </li></ul><ul><li>Localization work as we move to different countries/languages </li></ul><ul><li> Route narrative phrases, web page </li></ul><ul><li>2) Offer free routing services to developers </li></ul><ul><li>http:// /directions / </li></ul><ul><li>3) Identify routing issues and develop tools to allow them to be fixed </li></ul><ul><li>Working with members of the OSM community </li></ul><ul><li>4) Work towards using OSM data within US </li></ul><ul><li>Plan to offer an site in the future </li></ul><ul><li>US data needs improvements to geocoding and for navigability </li></ul><ul><li> MapQuest known for accurate directions </li></ul><ul><li> We have a large, engaged user base across multiple local properties in the US </li></ul>
    5. 6. MapQuest Routing Engine <ul><li>High performance and scalability (20K+ routes / minute across 12 hosts) </li></ul><ul><ul><li>A* heuristics, road filtering based on network level, efficient link marking and adjacency list structure </li></ul></ul><ul><ul><li>Data layout optimized to improve memory / disk cache performance </li></ul></ul><ul><li>Route Services </li></ul><ul><li>Additional routing services (developer services) supported </li></ul><ul><li>Mobile turn-by-turn navigation support </li></ul><ul><li> </li></ul><ul><li>Route Quality </li></ul><ul><ul><li>Directional link-based algorithm for calculating routes - simplifies issues with turn restrictions </li></ul></ul><ul><ul><li>Turn/Intersection costing based on turn geometry and road classes at intersection </li></ul></ul><ul><ul><ul><li>“ Maneuver” penalties to help generate routes with less turns </li></ul></ul></ul><ul><ul><li>Link density - slightly favor rural areas vs. urban areas </li></ul></ul><ul><li>Driving Directions Data Format </li></ul><ul><ul><li>Format is designed to provide high performance for driving routes </li></ul></ul><ul><ul><ul><li>Data layout is optimized to improve cache performance </li></ul></ul></ul><ul><li>Route Narrative Improvements </li></ul><ul><ul><li>Tailored route narratives create concise, simple directions </li></ul></ul><ul><ul><li>New enhanced narrative features like intersection counts, prior maneuvers, and gone-too-far guidance </li></ul></ul>
    6. 7. MapQuest Route Services <ul><li> - based on OSM data </li></ul><ul><li>Multiple input/output formats </li></ul><ul><li> JSON, XML, key-value pairs </li></ul><ul><li> </li></ul><ul><li>Current developer services based on commercial data </li></ul><ul><li>Route Matrix </li></ul><ul><li>Optimized Routes (TSP) </li></ul><ul><li>Path From Route </li></ul><ul><ul><li>Computes time/distance of a set of locations from a specific route </li></ul></ul><ul><ul><ul><li>Trim a set of locations to those that are on or close to a route </li></ul></ul></ul><ul><li>Time dependent routing </li></ul><ul><ul><li>Accounts for time dependent restrictions and real-time/historic speed data </li></ul></ul><ul><li>Draggable Routes </li></ul><ul><ul><li>Interactively drag a portion of the route </li></ul></ul><ul><li>Alternate Routes </li></ul><ul><ul><li>Provide alternate route paths and narrative </li></ul></ul>
    7. 8. Route Matrix <ul><li> </li></ul><ul><li>Calculates drive time matrix (time and distance) </li></ul><ul><ul><li>One-to-many </li></ul></ul><ul><ul><li>Many-to-many </li></ul></ul><ul><ul><li>Many-to-one (shortly) </li></ul></ul><ul><li>Supports wide range of applications </li></ul><ul><ul><li>As input to more robust route optimization (Traveling Salesman) method </li></ul></ul><ul><ul><li>Enhance search results with drive time </li></ul></ul><ul><ul><li>In-Car navigation: location finding aid </li></ul></ul><ul><ul><ul><li>Example: find the nearest gas station / convenience store while driving along an Interstate. </li></ul></ul></ul><ul><ul><li>Analysis applications </li></ul></ul><ul><ul><li>Meet in the middle </li></ul></ul><ul><ul><li>Commuter optimization </li></ul></ul><ul><ul><ul><ul><li>Drive time of bank employees to various “branches </li></ul></ul></ul></ul>
    8. 9. Optimized Routes <ul><li> </li></ul><ul><li>Traveling Salesman Problem (TSP) </li></ul><ul><ul><li>Combinatorial optimization problem </li></ul></ul><ul><ul><li>Brute force approach is not feasible </li></ul></ul><ul><ul><li>Well-designed heuristic algorithms can find “near-optimal” routes </li></ul></ul><ul><ul><ul><li>Simulated annealing approaches, Aarts, et al. (1988) </li></ul></ul></ul><ul><li>MapQuest Optimized Routing </li></ul><ul><ul><li>Calculates drive time matrix (or pedestrian walking time) </li></ul></ul><ul><ul><ul><li>From each location to all others </li></ul></ul></ul><ul><ul><li>Find “near-optimal” route using simulated annealing method </li></ul></ul><ul><ul><li>Reorder “intermediate” locations to match optimal path </li></ul></ul><ul><ul><li>Run a “standard” MapQuest route </li></ul></ul><ul><ul><li>Multi-leg </li></ul></ul><ul><ul><li>Develops itinerary (narrative and route shape) </li></ul></ul>
    9. 10. Route Data Ingestion <ul><li>osm4routing </li></ul><ul><li>OpenStreetMap data parser that creates nodes-edges adapted for routing applications </li></ul><ul><li>Route DB </li></ul><ul><li> PostGRES DB created by osm4route </li></ul><ul><li>osm2ddf </li></ul><ul><li>Reads RouteDB to create MapQuest DDF data (including route network) </li></ul><ul><li>DDFPostProcess </li></ul><ul><li>Validates route network, applies turn costs, optimizes network data structures </li></ul><ul><li>Driving Directions Format (DDF) </li></ul><ul><li>Proprietary data format used by MapQuest routing engine </li></ul>osm4routing OSM XML Route DB osm2ddf DDFPostProcess DDF routing
    10. 11. osm4routing <ul><li>Modified version of code from </li></ul><ul><li>Creates PostGRES Route DB with attributes required by MapQuest routing engine </li></ul><ul><ul><li>Primarily working with the edges table </li></ul></ul><ul><ul><li>DB schema - removed some attributes not required and added some new ones </li></ul></ul><ul><ul><li>Perform some data standardization and normalization </li></ul></ul><ul><li>Creates a relations/restrictions table </li></ul><ul><li>Will look to contribute changes back in the future </li></ul><ul><li>In the process of adding the ability to ingest OSM diff files </li></ul>osm4routing OSM XML Route DB osm2ddf DDFPostProcess DDF routing
    11. 12. osm2ddf <ul><li>Forms route network and optimizes data structure </li></ul><ul><ul><li>Computes link density for urban avoidance </li></ul></ul><ul><ul><li>Converts OSM tags into internal attributes </li></ul></ul><ul><ul><ul><li>Maps highway tags to default speeds and “network level” </li></ul></ul></ul><ul><li>Identifies and skip duplicate edges </li></ul><ul><li>Creates name file and other files used for narrative guidance </li></ul><ul><ul><li>Did some work to “standardize” ref names: e.g., E 45  E45 </li></ul></ul><ul><ul><li>Uses some country specific logic </li></ul></ul><ul><li>Computes compass directions of links (and begin/end of links) </li></ul><ul><ul><li>Allows rapid analysis of turns/intersections during guidance /narrative generation </li></ul></ul>osm4routing OSM XML Route DB osm2ddf DDFPostProcess DDF routing
    12. 13. Next Steps <ul><li>Incremental / automated data update </li></ul><ul><li>Start at weekly route data updates – move to daily </li></ul><ul><li>Plan to build some route data validation tools / quality assurance checks </li></ul><ul><li>Be able to reject and then fix major route issues </li></ul><ul><ul><ul><li>e.g., a broken connection along a major Interstate </li></ul></ul></ul><ul><ul><ul><li>Willing to tolerate errors in local regions but not incorrect edits on major highways </li></ul></ul></ul><ul><li>Develop tools to improve OSM data quality for routing </li></ul><ul><li>Data validation and correction tools </li></ul><ul><li>Working with the OSM community and contracting developers </li></ul><ul><li>Tune routing engine </li></ul><ul><li>Optimize performance and quality when using OSM data </li></ul><ul><li>Pedestrian Routing </li></ul><ul><li>Area landmark enhancements </li></ul><ul><li>Traffic Message Channel </li></ul><ul><li>Investigating ways to associate real time traffic information to OSM data </li></ul>
    13. 14. Pedestrian Routing Enhancements Area features to provide details since walkways and paths are often un-named|lu612007nq%2C20%3Do5-50zah&callback=renderAdvancedNarrative&avoidTimedConditions=false&outFormat=json&routeType=pedestrian&narrativeType=microformat&enhancedNarrative=true&locale=en_BG&unit=m&from=1717%20Champa%20St,Denver,CO&to=100%20W%2014th%20Avenue%20Pkwy,Denver,CO
    14. 15. OSM data improvements for routing <ul><li>TIGER data import quality </li></ul><ul><li>Driveways </li></ul><ul><li>old/abandoned roads </li></ul><ul><li>Duplicate edges / ways </li></ul><ul><li>Incorrect oneways </li></ul><ul><li>Exit information (e.g. motorway exits) </li></ul><ul><li>Lack of consistently applied data standards </li></ul><ul><li>Model after what is recommended for Germany </li></ul><ul><li> Exit number, road name to which the exit connects, the city/town that the exit services </li></ul><ul><li> exit_to? </li></ul><ul><li>Relations / Restrictions </li></ul><ul><li>Often see intermediate roads being improperly ordered / connected </li></ul><ul><li>Time dependent relations – may be more important in US than Europe? </li></ul>
    15. 16. OSM data improvements for routing (cont.) <ul><li>Bad connectivity, disjoint network areas </li></ul><ul><li>Connection to Ferries </li></ul><ul><li>Many are highway = service </li></ul><ul><li> </li></ul><ul><li> Meant for alleyways, driveways, deliveries? </li></ul><ul><li> Disrupts road filtering / performance </li></ul><ul><li>“ Isolated&quot; ways that are drivable but not connected to any drivable links </li></ul><ul><li>e.g., a drivable service road amongst pedestrian ways </li></ul><ul><li> City center search may find this as the closest road, driving routes fail </li></ul><ul><li>Surface tags </li></ul><ul><ul><li>We care about paved vs. unpaved for vehicle access </li></ul></ul><ul><ul><li>Too many free-form tags: e.g., surface = very horrible </li></ul></ul>
    16. 17. Bad Connectivity <ul><li>Interstate connection without a ramp </li></ul>
    17. 18. Incorrect oneway Thanks to Robert Chell @ 1Spatial Reversed !
    18. 19. Nice map! Route? <ul><li> </li></ul><ul><li>Ferry near Calgary </li></ul>16 edges!
    19. 20. Questions? David Nesbitt [email_address] 717-581-4874
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.