Table of Contents

pgRouting extends the PostGIS/PostgreSQL geospatial database to provide geospatial routing and other network analysis functionality.

This is the manual for pgRouting v3.2.2.

Creative Commons Attribution-Share Alike 3.0 License

The pgRouting Manual is licensed under a Creative Commons Attribution-Share Alike 3.0 License. Feel free to use this material any way you like, but we ask that you attribute credit to the pgRouting Project and wherever possible, a link back to For other licenses used in pgRouting see the Licensing page.


  • Sample Data that is used in the examples of this manual.

Pgrouting Concepts


Function Families

All Pairs - Family of Functions

aStar - Family of functions

Bidirectional A* - Family of functions

Bidirectional Dijkstra - Family of functions

Components - Family of functions

Contraction - Family of functions

Dijkstra - Family of functions

Flow - Family of functions

Kruskal - Family of functions

Prim - Family of functions

Topology - Family of Functions

Traveling Sales Person - Family of functions

pgr_trsp - Turn Restriction Shortest Path (TRSP) - Turn Restriction Shortest Path (TRSP)

Functions by categories

Cost - Category

Cost Matrix - Category

Driving Distance - Category

K shortest paths - Category

  • pgr_KSP - Yen’s algorithm based on pgr_dijkstra

Spanning Tree - Category

Available Functions but not official pgRouting functions

Release Notes

Indices and tables