Trick to allow importing an entire country to pgRouting/PostGIS/PostgreSQL [1]: first chop up the source into smaller pieces using splitter [2], otherwise the osm2pgrouting tool will keep crashing:

$ java -jar splitter.jar --output-dir=splits/ country.osm
$ ONCE=--clean; for f in splits/*.pbf; do osmconvert $f --out-osm -o=part.osm; osm2pgrouting -f part.osm $ONCE ...; ONCE=; done


Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!