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.0.0-alpha.

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.

Pgrouting Concepts


pgr_version - Get pgRouting’s version information. pgr_full_version - Get pgRouting’s details of version.

Topology - Family of Functions

Routing Functions

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

  • pgr_dijkstra - Dijkstra’s algorithm for the shortest paths.
  • pgr_dijkstraCost - Get the aggregate cost of the shortest paths.
  • pgr_drivingDistance - Use pgr_dijkstra to calculate catchament information.
  • pgr_KSP - Use Yen algorithm with pgr_dijkstra to get the K shortest paths.

Flow - Family of functions

Spanning Tree - Families

pgr_KSP - K-Shortest Path

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


Driving Distance - Category

Available Functions but not official pgRouting functions