routing icon indicating copy to clipboard operation
routing copied to clipboard

How to Generate large-scale (global level) routerdb

Open Coco19951004 opened this issue 5 years ago • 1 comments

@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!

Coco19951004 avatar Dec 09 '19 04:12 Coco19951004

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!

juliusfriedman avatar Feb 29 '20 00:02 juliusfriedman