FOSS4G2007                    Presentation  Shortest path search in real      road networks with          pgRouting     pg...
IntroductionpgRouting is an extension of PostgreSQL and PostGIS. A predecessor of pgRouting ­ pgDijkstra, written by Sylva...
How it works                                             Pl/PgSQL    SQL query       C++ core         C wrapper           ...
Shortest path algorithms ●   Dijkstra     ●         Well known and fair shortest path algorithm     ●         Always finds...
Shooting*● Edge­based heuristic shortest path algorithm ● Supports maneuver restrictions and traffic lights● Properly proc...
Comparison with other           algorithms       Dijkstra         cost=cost(vertex1, vertex2)                             ...
Real road networks     A                     B                 CA)Signs (restrict maneuvers)B)Traffic lights (delays)C)Roa...
Network representation         d                       d                          c                                       ...
Routing data structure                   Dijkstra                                                   A*                    ...
Thank you!              pgrouting.postlbs.org                        orkney.co.jp     pgRoutingShortest path search in rea...
Upcoming SlideShare
Loading in …5
×

Foss4g presentation

163
-1

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
163
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Foss4g presentation

  1. 1. FOSS4G2007 Presentation Shortest path search in real road networks with pgRouting pgRouting Anton Patrushev (Orkney, Inc.)Shortest path search in real road networkswith pgRouting 1
  2. 2. IntroductionpgRouting is an extension of PostgreSQL and PostGIS. A predecessor of pgRouting ­ pgDijkstra, written by Sylvain Pasche from Camptocamp, was extended by Orkney (Japan) and renamed to pgRouting.pgRouting includes:* Shortest path search (Dijkstra, A*, Shooting*)* Traveling Salesperson Problem (TSP) solution* Driving distance polygon calculationShortest path search in real road networkswith pgRouting 2
  3. 3. How it works Pl/PgSQL SQL query C++ core C wrapper function (data)Shortest path search in real road networkswith pgRouting 3
  4. 4. Shortest path algorithms ● Dijkstra ● Well known and fair shortest path algorithm ● Always finds mathematically shortest path ● Good for sparse networks ● A* ● Well known heuristic shortest path algorithm ● Needs vertex geometry information ● Searches through less number of vertexes ● Good for dense networks ● Shooting*Shortest path search in real road networkswith pgRouting 4
  5. 5. Shooting*● Edge­based heuristic shortest path algorithm ● Supports maneuver restrictions and traffic lights● Properly processes parallel edges● Good for dense networksPredecessors:● Modified A* ­ Wolfgang Schmid, 2000, Stephan Winter, 2002● C* ­ Ingrid Flinsenberg, 2004Shortest path search in real road networkswith pgRouting 5
  6. 6. Comparison with other algorithms Dijkstra cost=cost(vertex1, vertex2) Each vertex can be visited only once A* cost=cost(vertex1, vertex2)+H(vertex1, vertex2) Each vertex can be visited only once Shooting* cost=cost(edge1)+cost(edge1, edge2)+H(edge1) Each edge can be visited only once Parallel edges handling Dijkstra/A* Shooting*Shortest path search in real road networkswith pgRouting 6
  7. 7. Real road networks A B CA)Signs (restrict maneuvers)B)Traffic lights (delays)C)Road marking (restrict maneuvers)Shortest path search in real road networkswith pgRouting 7
  8. 8. Network representation d d c f d a b c a b c cost(eb,ab)=1min a b cost(eb,bd)=1min cost(eb,bc)=∞ cost(eb,bc)=1min cost(ab,bd,df)=∞ e e ... e B ... A C ...A)Right turn costs too muchB)Driving through vertex b passage costs extraC)Driving from a to f costs too muchShortest path search in real road networkswith pgRouting 8
  9. 9. Routing data structure Dijkstra A* Shooting* Edge Edge Edge ● id ● id ● id ● cost ● cost ● cost ● reverse_cost ● reverse_cost ● reverse_cost ● Source vertex ● Source vertex ● Adjacent edge ● id ● id ● rule ● Target vertex ● x ● to_cost ● id ● y ● Source vertex ● Target vertex ● id ● id ● x ● x ● y ● y ● Target vertex ● id ● x ● yShortest path search in real road networkswith pgRouting 9
  10. 10. Thank you! pgrouting.postlbs.org orkney.co.jp pgRoutingShortest path search in real road networkswith pgRouting 10
  1. A particular slide catching your eye?

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

×