# pgRouting Manual (3.3)

## Table of Contents

- Supported versions: Latest (3.3) 3.2 3.1 3.0

- 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 v3.3.0.

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

## General

- Introduction
  - Licensing
  - Contributors
  - More Information
- Installation
  - Short Version
  - Get the sources
  - Enabling and upgrading in the database
  - Dependencies
  - Configuring
  - Building
  - Testing
  - See Also
- Support
  - Reporting Problems
  - Mailing List and GIS StackExchange
  - Commercial Support

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

## Pgrouting Concepts

- pgRouting Concepts
  - Getting Started
  - Group of Functions
  - Inner Queries
  - Parameters
  - Return columns & values
  - Advanced Topics
  - Performance Tips
  - How to contribute

Reference

- pgr_version - Get pgRouting’s version information.

- pgr_full_version - Get pgRouting’s details of version.

## Function Families

All Pairs - Family of Functions

- pgr_floydWarshall - Floyd-Warshall’s algorithm.

- pgr_johnson - Johnson’s algorithm

aStar - Family of functions

- pgr_aStar - A* algorithm for the shortest path.

- pgr_aStarCost - Get the aggregate cost of the shortest paths.

- pgr_aStarCostMatrix - Get the cost matrix of the shortest paths.

Bidirectional A* - Family of functions

- pgr_bdAstar - Bidirectional A* algorithm for obtaining paths.

- pgr_bdAstarCost - Bidirectional A* algorithm to calculate the cost of the paths.

- pgr_bdAstarCostMatrix - Bidirectional A* algorithm to calculate a cost matrix of paths.

Bidirectional Dijkstra - Family of functions

- pgr_bdDijkstra - Bidirectional Dijkstra algorithm for the shortest paths.

- pgr_bdDijkstraCost - Bidirectional Dijkstra to calculate the cost of the shortest paths

- pgr_bdDijkstraCostMatrix - Bidirectional Dijkstra algorithm to create a matrix of costs of the shortest paths.

Components - Family of functions

- pgr_connectedComponents - Connected components of an undirected graph.

- pgr_strongComponents - Strongly connected components of a directed graph.

- pgr_biconnectedComponents - Biconnected components of an undirected graph.

- pgr_articulationPoints - Articulation points of an undirected graph.

- pgr_bridges - Bridges of an undirected graph.

Contraction - Family of functions

- pgr_contraction

Dijkstra - Family of functions

- pgr_dijkstra - Dijkstra’s algorithm for the shortest paths.

- pgr_dijkstraCost - Get the aggregate cost of the shortest paths.

- pgr_dijkstraCostMatrix - Use pgr_dijkstra to create a costs matrix.

- 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

- pgr_maxFlow - Only the Max flow calculation using Push and Relabel algorithm.

- pgr_boykovKolmogorov - Boykov and Kolmogorov with details of flow on edges.

- pgr_edmondsKarp - Edmonds and Karp algorithm with details of flow on edges.

- pgr_pushRelabel - Push and relabel algorithm with details of flow on edges.

- Applications

  - pgr_edgeDisjointPaths - Calculates edge disjoint paths between two groups of vertices.

  - pgr_maxCardinalityMatch - Calculates a maximum cardinality matching in a graph.

Kruskal - Family of functions

- pgr_kruskal

- pgr_kruskalBFS

- pgr_kruskalDD

- pgr_kruskalDFS

Prim - Family of functions

- pgr_prim

- pgr_primBFS

- pgr_primDD

- pgr_primDFS

Topology - Family of Functions

- pgr_createTopology - to create a topology based on the geometry.

- pgr_createVerticesTable - to reconstruct the vertices table based on the source and target information.

- pgr_analyzeGraph - to analyze the edges and vertices of the edge table.

- pgr_analyzeOneWay - to analyze directionality of the edges.

- pgr_nodeNetwork -to create nodes to a not noded edge table.

Traveling Sales Person - Family of functions

- pgr_TSP - When input is given as matrix cell information.

- pgr_TSPeuclidean - When input are coordinates.

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

## Functions by categories

Cost - Category

- pgr_aStarCost

- pgr_dijkstraCost

Cost Matrix - Category

- pgr_aStarCostMatrix

- pgr_dijkstraCostMatrix

Driving Distance - Category

- pgr_drivingDistance - Driving Distance based on Dijkstra’s algorithm

- pgr_primDD - Driving Distance based on Prim’s algorithm

- pgr_kruskalDD - Driving Distance based on Kruskal’s algorithm

- Post pocessing

  - pgr_alphaShape - Alpha shape computation

K shortest paths - Category

- pgr_KSP - Yen’s algorithm based on pgr_dijkstra

Spanning Tree - Category

- Kruskal - Family of functions

- Prim - Family of functions

## Available Functions but not official pgRouting functions

- Proposed Functions

- Experimental Functions

## Release Notes

- Release Notes
  - pgRouting 3.3.0 Release Notes
  - pgRouting 3.2.2 Release Notes
  - pgRouting 3.2.1 Release Notes
  - pgRouting 3.2.0 Release Notes
  - pgRouting 3.1.4 Release Notes
  - pgRouting 3.1.3 Release Notes
  - pgRouting 3.1.2 Release Notes
  - pgRouting 3.1.1 Release Notes
  - pgRouting 3.1.0 Release Notes
  - pgRouting 3.0.6 Release Notes
  - pgRouting 3.0.5 Release Notes
  - pgRouting 3.0.4 Release Notes
  - pgRouting 3.0.3 Release Notes
  - pgRouting 3.0.2 Release Notes
  - pgRouting 3.0.1 Release Notes
  - pgRouting 3.0.0 Release Notes
  - pgRouting 2.6.3 Release Notes
  - pgRouting 2.6.2 Release Notes
  - pgRouting 2.6.1 Release Notes
  - pgRouting 2.6.0 Release Notes
  - pgRouting 2.5.5 Release Notes
  - pgRouting 2.5.4 Release Notes
  - pgRouting 2.5.3 Release Notes
  - pgRouting 2.5.2 Release Notes
  - pgRouting 2.5.1 Release Notes
  - pgRouting 2.5.0 Release Notes
  - pgRouting 2.4.2 Release Notes
  - pgRouting 2.4.1 Release Notes
  - pgRouting 2.4.0 Release Notes
  - pgRouting 2.3.2 Release Notes
  - pgRouting 2.3.1 Release Notes
  - pgRouting 2.3.0 Release Notes
  - pgRouting 2.2.4 Release Notes
  - pgRouting 2.2.3 Release Notes
  - pgRouting 2.2.2 Release Notes
  - pgRouting 2.2.1 Release Notes
  - pgRouting 2.2.0 Release Notes
  - pgRouting 2.1.0 Release Notes
  - pgRouting 2.0.1 Release Notes
  - pgRouting 2.0.0 Release Notes
  - pgRouting 1.x Release Notes

Indices and tables

- Index

- Search Page