pgRouting is a PostGIS extension that brings routing tools to the table. pgRouting offers an extensive set of algorithms to choose from, can solve traveling salesman problems, calculate drive time zones, and even obey turn restrictions and avoid one-way streets.
With such a toolbox, one can create some pretty serious routing services that can be consumed, for example, by web applications.
In this chapter, we will focus on:
- Installing the pgRouting extension
- Importing routing data:
- Importing shapefiles
- Importing OSM data using osm2pgrouting
- Routing algorithms:
- All pairs shortest path
- Shortest path
- Driving distance
- Traveling sales person
Our final example will be a simple web application that calculates shortest routes in the city of Vienna.