Importing OSM data using osm2pgrouting
If you happen to prefer OpenStreetMap data for your routing solutions, you can use the osm2pgrouting utility to import network data directly from the OSM format.
As mentioned earlier, pgRouting may have been bundled with your PostGIS installation. In such cases, osm2pgrouting should already be installed - see if the utility is available in the PgSQL's bin, or simply type osm2pgrouting in the console.
If you see help for the tool, you're good to go; otherwise, you will have to install it.
osm2pgrouting gets much more love from Unix users (obviously), so if you happen to be one of a kind, in order to get the utility, follow the instructions from here: https://github.com/pgRouting/osm2pgrouting/tree/osm2pgrouting-2.1.0 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access