Locate Press

Open Source Geospatial Books

pgRouting: A Practical Guide

by Regina Obe and Leo Hsu

pgRouting logo of blue elephant following a GPS map

Extending PostgreSQL and PostGIS with routing
and graph analysis

What is pgRouting? It's a PostgreSQL extension for developing network routing applications and doing graph analysis.

Interested in pgRouting? If so, chances are you already use PostGIS, the spatial extender for the PostgreSQL database management system. So when you've got PostGIS, why do you need pgRouting? PostGIS is a great tool for molding geometries and doing proximity analysis, however it falls short when your proximity analysis involves constrained paths such as driving along a road or biking along defined paths.

PostGIS alone can't help you apply costs and resource constraints to your travels, such as traffic congestion, mileage restrictions, or allocating resources like vehicles. pgRouting is a complement to PostGIS that allows you to incorporate costs and path restrictions to your proximity analysis.

pgRouting is well suited to building travel navigation systems and computing driving distance polygons for places of interest. While the main focus of pgRouting is GIS applications, it can be used for non-GIS resource management and routing applications.

Book cover for pgRouting: A Practical Guide by Locate Press

PDF $29.99
282 pages
ISBN 978-0989421737
Published 2017-05-31


  1. Getting Started with pgRouting
    • Introducing pgRouting
    • A Primer
  2. Working with Data
    • Importing ESRI Shapefiles
    • Importing Textual Data
    • Using ogr2ogr to Load Data
    • Importing OSM Data
    • Foreign Data Wrappers
  3. Working with pgRouting Functions
    • Writing pgRouting Wrapper Functions
    • Data Fixing and Applying Costs
    • Multiple Routes to Single Destination (KSP)
    • Dijkstra In-depth
    • Catchement Areas and Isochrones
    • Traveling Salesperson Problems
    • Vehicle Routing Problems
    • Routing with Turn Restriction Functions
  1. Using QGIS with pgRouting
    • Setting up a PostGIS Connection using PostGIS Add Layer
    • Map View Panel
    • Db Manager Plugin
    • OpenLayers Plugin
    • pgRoutingLayer Plugin
  2. Integrating pgRouting in Web applications
    • Basic Application Setup
    • Database Stored Functions to Support App
    • Web Server-side
    • Client Front-end
    • Web Mapping Client
  3. Appendix
    • Appendix A: changes between pgRouting 2.0 and 2.1
    • Appendix B: Installation extras
  © Copyright 2013-2021 Locate Press, All Rights Reserved    
5.0.0 titan