pgRouting adds routing functionality to PostGIS. This presentation will show the inside and current state of pgRouting development. We will explain the shortest path search in real road networks and how the data structure is important to get better routing results. Furthermore we will show how you can improve the quality of the search with dynamic costs and make the result look closer to the reality. You will learn about difficulties and limitations of implementing routing functionality in GIS applications, the difference between algorithms and their performance.
pgRouting includes:
- Shortest path search (3 algorithms: Dijkstra, A-Star, Shooting Star)
- Traveling salesperson problem solver (TSP)
- Driving distance calculation
- NEW: Dial-a-ride-problem solver (DARP)
- NEW: All-pair-shortest-path algorithm (APSP)
pgRouting is an extension of PostgreSQL and PostGIS. A predecessor of pgRouting's pgDijkstra, written by Camptocamp, was later extended by Orkney and renamed to pgRouting. The project is now supported by Georepublic and a broad user community.
13. SQL Function
SELECT * FROM shortest_path('
SELECT gid as id,
source::integer,
target::integer,
length::float8 as cost
FROM ways',
605, 359, false, false);