itinero / routing

The routing core of itinero.
Apache License 2.0
222 stars 70 forks source link

How to Generate large-scale (global level) routerdb #290

Open Coco19951004 opened 4 years ago

Coco19951004 commented 4 years ago

@xivk Hello sir,I am new to this topic , even to this foreign platform.. I have some questions and I will really appreciate the forgiveness if there is any word nonstandard in my description.. In 2016 I saw you uploaded a planet-wide routerdb file only for car routing with no contracted graph. I've downloaded it and it works. But when I want to generate a planet-wide routerdb file by myself I failed for out of running memory on my computer (16G) or even on the server of our laboratory. So i wonder how you compress this planet-wide routerdb file to 10G(planet.osm.pbf is already more than 50G) or how to successfully generate large-scale routerdb file without stucking.. Thank you!

juliusfriedman commented 4 years ago

You would probably have to keep the stream open and not use memory mapping e.g. RouterDb.NoCache I believe.

You can also use osmium to strip out various pieces you don't need and then load a RouterDb for each that you do.

E.g. I break down Rail and Highway into separate files using that tool.

If you need an example of a command to drop everything but rail see: https://nielswarburton.net/2019/03/18/traveling-by-train/

It can also be adapted to drop highway or other parts you don't need for each router instance and then depending on the type of transport your requiring you then load up that specific routerDb instance.

Hopefully that helps!