How to do it...

When osm2pgrouting is run without anything set, the output shows us the options that are required and available to use with osm2pgrouting:

To run the osm2pgrouting command, we have a small number of required parameters. Double-check the paths pointing to mapconfig.xml and cleveland.osm before running the following command:

osm2pgrouting --file cleveland.osm --conf /usr/share/osm2pgrouting/mapconfig.xml --dbname postgis_cookbook --user me --schema chp06 --host localhost --prefix cleveland_ --clean

Our dataset may be quite large, and could take some time to process and import—be patient. The end of the output should say something ...

Get PostGIS Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.