Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Routing OpenStreetMap

itszero
April 13, 2015

Routing OpenStreetMap

Brief introduction to A* and routing on OpenStreetMap data.

itszero

April 13, 2015
Tweet

More Decks by itszero

Other Decks in Programming

Transcript

  1. Georgia Institute ofTechnology d a o R l l i

    t 4 1 t e e r t S a t t e i r a M W N t S h t 0 1 Tech Pk y N W W N e v A l l i h p m e H W N e u n e v A h t r o N FerstDrNW Fers tDr NW WilliamsSt SpringSt NW 10thStN WPeachtree St NW t S e e r t h c a
  2. S 1 E 2 node 1/-10 5/6 1/1 10/10 7/5

    2 0 + 6 5 - 10 E 5 + 1
  3. which leads us to my first result… A* OpenStreetMap router

    written in Ruby https://github.com/itszero/osm-simple-router
  4. Cypher Query Language MATCH (actor:Person)-[:ACTED_IN]->(movie:Movie) WHERE movie.title =~ "T.*" RETURN

    movie.title as title, collect(actor.name) as cast ORDER BY title ASC LIMIT 10;
  5. Sure it helps having proper storing and querying engine, but

    the data is still too much. ~25x improves? 5 secs?
  6. take Atlanta metro area for an example 2,567,916 nodes ➔

    452,313 (-83%) 10,669,432 relationships ➔ 1,843,440 (-83%) 4.65 secs. routing time ➔ 1.30 secs.
  7. Now we have the algorithm, all we need to do

    is plug it into the database.
  8. which leads us to my second result… A* OpenStreetMap router

    for Neo4j https://github.com/itszero/neo4j-astar-example (code is really ugly tho)