pgrouting 2.0 presentation 2013
DESCRIPTION
In 2013 pgRouting was presentated at three FOSS4G events, in Nottingham, Tokyo and Osaka. In case you have missed them all, take a look at the presentation slides.TRANSCRIPT
![Page 1: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/1.jpg)
Shortest Path Search with pgRouting
![Page 2: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/2.jpg)
What is pgRouting ?
![Page 3: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/3.jpg)
An Extension for
PostgreSQL / PostGIS,
...
![Page 4: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/4.jpg)
An Open Source
project, ...
![Page 5: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/5.jpg)
A Library providing, ...
![Page 6: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/6.jpg)
Shortest Path
![Page 7: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/7.jpg)
Driving Distance
![Page 8: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/8.jpg)
Traveling Salesperson
![Page 9: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/9.jpg)
v2.0
![Page 10: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/10.jpg)
Feature Highlights
➔ Two new All Pairs Short Path algorithms
➔ Bi-directional Dijkstra and A-star algorithms
➔ One to many nodes shortest path search
➔ New TSP solver (with distance matrix)
➔ Turn Restricted shortest path (replaces Shooting
Star algorithm)
➔ A collection of useful utility and graph analytics
functions
![Page 11: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/11.jpg)
More Highlights
➔ Modular library design
➔ Unit tests and automated tests with Travis
➔ Compatibility with PostgreSQL 9.1+ / PostGIS 2.0+
➔ Installs as PostgreSQL EXTENSION
➔ Added pgr_ prefix to functions and types
➔ Improved build process for Windows
➔ Better documentation in several languages
https://www.transifex.com/projects/p/pgrouting/
![Page 12: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/12.jpg)
Big THANK YOU to
- Steve Woodbridge
… and the pgRouting community!
- Regina Obe
![Page 13: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/13.jpg)
Most users need pgRouting for
Road Networks
How do they look like?
![Page 14: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/14.jpg)
Like this ...
![Page 15: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/15.jpg)
… or like this ...
![Page 16: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/16.jpg)
… or sometimes like this.
![Page 17: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/17.jpg)
What makes them real?
Traffic lights Signs Road marking
![Page 18: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/18.jpg)
pgRouting extends
PostgreSQL/PostGIS
What does this mean?
![Page 19: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/19.jpg)
SQL Function
SELECT * FROM pgr_dijkstra(' SELECT gid as id, source::integer, target::integer, length::float8 as cost FROM ways', 30, 60, false, false);
![Page 20: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/20.jpg)
Query Result
seq | node | edge | cost -----+------+------+--------------------- 0 | 30 | 53 | 0.0591267653820616 1 | 44 | 52 | 0.0665408320949312 2 | 14 | 15 | 0.0809556879332114 3 | 13 | 14 | 0.072694271986776 4 | 12 | 13 | 0.081239348480584 5 | 11 | 12 | 0.00746935522787469 6 | 10 | 6869 | 0.0164274192597773 7 | 59 | 72 | 0.0109385169537801 8 | 60 | -1 | 0(9 rows)
![Page 21: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/21.jpg)
gid,source,target,cost,reverse_cost,x1, y1,x2, y2,rule, to_cost
source
target
![Page 22: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/22.jpg)
Traffic lights slow down
… so costs must increase.
![Page 23: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/23.jpg)
1 min
cost(A) = cost(A) + 30seccost(B) = cost(B) + 30seccost(C) = cost(C) + 30seccost(D) = cost(D) + 30sec
B C
D
A
![Page 24: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/24.jpg)
Signs inform about
restrictions and rules
![Page 25: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/25.jpg)
![Page 26: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/26.jpg)
cost(A) = length(A)
reverse_cost(A) = ∞
A
![Page 27: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/27.jpg)
Sometimes
the costs
have different
meaning.
![Page 28: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/28.jpg)
A
B
cost(A) = length(A) / 2
reverse_cost(A) = length(A) * 4
![Page 29: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/29.jpg)
Road type can be used
for cost calculation.
![Page 30: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/30.jpg)
Not only road types
but also conditions
![Page 31: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/31.jpg)
And you know
what is great about pgRouting?
![Page 32: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/32.jpg)
All costs are dynamic!
… which is the opposite to pre-calculated
![Page 33: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/33.jpg)
If the road is closed ...
![Page 34: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/34.jpg)
… or there is an accident, ...
![Page 35: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/35.jpg)
… there is a sign with restrictions limited to a certain time, ...
![Page 36: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/36.jpg)
… bad weather conditions ...
![Page 37: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/37.jpg)
You don't need to
rebuild and reload
your network
![Page 38: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/38.jpg)
You only need to adjust the cost
for this particular road,
… and the next search will go another way.
![Page 39: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/39.jpg)
Flexiblity vs. Speed
![Page 40: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/40.jpg)
Cost can be virtually anything
![Page 41: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/41.jpg)
pgRouting can be used for
different kinds of networks
![Page 42: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/42.jpg)
Canals and Rivers
![Page 43: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/43.jpg)
Hiking trails
![Page 44: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/44.jpg)
… or any other kind of networks
![Page 45: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/45.jpg)
Roadmap for Version 2.1
➔ Add “Multi-modal public transit routing”
(GSoC 2011)
➔ Add “Time dependent shortest path” algorithm
(GSoC 2011)
➔ Add “Two Queue” Algorithm (GSoC 2012)
➔ Add DARP and VRP (GSoC 2013)
➔ Add Graph network partitioning (GSoC 2013)
➔ …. further improvements and bug fixes.
![Page 46: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/46.jpg)
https://github.com/pgRouting
![Page 47: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/47.jpg)
Website: pgrouting.org
Documentation: docs.pgrouting.org
Workshop: workshop.pgrouting.org
日本語 NEW workshop.pgrouting.org/ja
Support: pgrouting.org/support.html
More Information
… or talk contact us directly:
➔ Daniel Kastl [email protected]
➔ Hal Seki [email protected]
![Page 48: pgRouting 2.0 presentation 2013](https://reader034.vdocuments.net/reader034/viewer/2022050905/5495b1edac795925288b50b8/html5/thumbnails/48.jpg)
Photos from sxc.hu and
flickr under Creative Commons Licence.