Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Routing OpenStreetMap
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
itszero
April 13, 2015
Programming
1.4k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Routing OpenStreetMap
Brief introduction to A* and routing on OpenStreetMap data.
itszero
April 13, 2015
More Decks by itszero
See All by itszero
d3.js: the core concepts
itszero
1
2.5k
EcoSec
itszero
1
210
TaipeiFever
itszero
0
320
Other Decks in Programming
See All in Programming
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
530
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
120
Oxlintのカスタムルールの現況
syumai
6
1k
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
130
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
270
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
210
Webフレームワークの ベンチマークについて
yusukebe
0
150
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
690
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
320
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
120
LLM Plugin for Node-REDの利用方法と開発について
404background
0
170
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
0
200
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Building an army of robots
kneath
306
46k
Speed Design
sergeychernyshev
33
1.8k
Done Done
chrislema
186
16k
Between Models and Reality
mayunak
4
330
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Become a Pro
speakerdeck
PRO
31
6k
So, you think you're a good person
axbom
PRO
2
2.1k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
380
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
310
Transcript
Routing OpenStreetMap Zero Cho
A quick recap on Graph
node edge 1 weight 5 1 10
node edge 1 weight 5 1 10 shortest path, weight
= 7
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
a Fers tDr NW
None
None
How is routing done?
many ways. We will talk about A-star algorithm today.
S 1 E 2 node 1/-10 5/6 1/1 10/10 7/5
S 1 E 2 node 1/-10 5/6 1/1 10/10 7/5
S 1 E 2 node 1/-10 5/6 1/1 10/10 7/5
1 2 0 + 5 0 + 6
S 1 E 2 node 1/-10 5/6 1/1 10/10 7/5
2 0 + 6 5 - 10 E 5 + 1
S 1 E 2 node 1/-10 5/6 1/1 10/10 7/5
E 5 + 1 -5 + 10
S 1 E 2 node 1/-10 5/6 1/1 10/10 7/5
E 5
which leads us to my first result… A* OpenStreetMap router
written in Ruby https://github.com/itszero/osm-simple-router
which is great… except it’s…
so slow.
How do we improve it?
Moving to neo4j a Graph-based database.
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;
Sure it helps having proper storing and querying engine, but
the data is still too much. ~25x improves? 5 secs?
None
None
intersections
overlay link 3 5 8*
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.
Now we have the algorithm, all we need to do
is plug it into the database.
which leads us to my second result… A* OpenStreetMap router
for Neo4j https://github.com/itszero/neo4j-astar-example (code is really ugly tho)
None
Questions?