Supported versions: latest (3.8) 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 main dev
Unsupported versions:2.6 2.5 2.4 2.3 2.2 2.1 2.0

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 v2.5.5.

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 http://pgrouting.org. For other licenses used in pgRouting see the Licensing page.

Data Types

  • pgr_costResult[] - A set of records to describe a path result with cost attribute.
  • pgr_costResult3[] - A set of records to describe a path result with cost attribute.
  • pgr_geomResult - A set of records to describe a path result with geometry attribute.

Topology Functions

Routing functions

All Pairs - Family of Functions

pgr_aStar - Shortest Path A*

pgr_bdAstar - Bi-directional A* Shortest Path

pgr_bdDijkstra - Bi-directional Dijkstra Shortest Path

Dijkstra - Family of functions

pgr_KSP - K-Shortest Path

pgr_trsp - Turn Restriction Shortest Path (TRSP)

Traveling Sales Person - Family of functions

Driving Distance - Category

Available Functions but not official pgRouting functions