pgrouting

Geospatial routing extension for PostGIS and PostgreSQL databases

brewmacoslinux
Try with needOr install directly
Source

About

Provides geospatial routing for PostGIS/PostgreSQL database

Commands

pgrouting

Examples

Create pgRouting extension in PostgreSQL database$ psql -d your_database -c 'CREATE EXTENSION pgrouting;'
Query shortest path between two nodes using Dijkstra algorithm$ psql -d your_database -c "SELECT * FROM pgr_dijkstra('SELECT id, source, target, cost FROM edges', 1, 5, false);"
Calculate traveling salesman problem route for multiple waypoints$ psql -d your_database -c "SELECT * FROM pgr_tsp('SELECT id, source, target, cost FROM edges', 1);"