osm2pgrouting

Import OpenStreetMap data into pgRouting-enabled PostgreSQL databases

brewmacoslinux
Try with needOr install directly
Source

About

Import OSM data into pgRouting database

Commands

osm2pgrouting

Examples

Import OSM data from a file into a pgRouting database$ osm2pgrouting -f map.osm -d routing_db -u postgres -p 5432
Import OSM data with custom configuration file$ osm2pgrouting -f map.osm -d routing_db -c mapconfig.xml -u postgres
Create new database and import OSM data in one command$ osm2pgrouting -f map.pbf -d new_routing_db -U postgres -W password --create