# pgRouting Manual (2.5)

## 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.2.

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.

## 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
  - Inner Queries
  - Return columns & values
  - Advanced Topics
  - Performance Tips
  - How to contribute

Reference

pgr_version - to get pgRouting’s version information.

## 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

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

## Routing functions

All Pairs - Family of Functions

- pgr_floydWarshall - Floyd-Warshall’s Algorithm
- pgr_johnson- Johnson’s Algorithm

pgr_aStar - Shortest Path A*

pgr_bdAstar - Bi-directional A* Shortest Path

pgr_bdDijkstra - Bi-directional Dijkstra Shortest Path

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 - proposed - 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.
- pgr_dijkstraVia - Proposed - Get a route of a seuence of vertices.

pgr_KSP - K-Shortest Path

pgr_trsp - Turn Restriction Shortest Path (TRSP)

Traveling Sales Person - Family of functions

- pgr_TSP - When input is given as matrix cell information.
- pgr_eucledianTSP - When input are coordinates.

Driving Distance - Category

- pgr_drivingDistance - Driving Distance based on pgr_dijkstra
- pgr_withPointsDD - Proposed - Driving Distance based on pgr_withPoints
- Post pocessing
  - pgr_alphaShape - Alpha shape computation
  - pgr_pointsAsPolygon - Polygon around a set of points

## Available Functions but not official pgRouting functions

- Stable Proposed Functions
- Experimental Functions

## Change Log

- 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