Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.28k stars 3.32k forks source link

Cut regional extracts #6065

Closed nilsnolde closed 3 weeks ago

nilsnolde commented 3 years ago

Couldn't find any info on the topic (quite surprisingly..): given a built planet CH graph I'd like to be able to extract regions (a la Geofabrik).

I'd figure it can't be a very tough job (though probably a pretty annoying one). Before I give it a deep dive, I wanted to get some feedback if it's even feasible or if there some serious challenges.

danpat commented 3 years ago

I'm not sure it makes sense to cut the graph after the CH is formed - the shape of the CH is very sensitive to all edges present, and it may not be possible to generate a fully routable geographic extract without re-building. In particular, shortest paths around the edges of the extract would likely need to change, which means the structure of the CH would also need to change to remain valid.

Certainly any code to do this would have an awful lot of careful edge renumbering to do.

The only way that would work today would be to cut the OSM data before processing. Overall, if the OSM extracts did not overlap, I don't think it would use significantly more compute time to process many smaller OSM extracts compared to processing a planet with CH then splitting it up (if that can even be done validly).

nilsnolde commented 3 years ago

Thanks @danpat , I feared smth like that. Makes sense though as OSRM Is not built with regional extracts in mind.

Having OSM extracts to build is unfortunately prohibitively expensive for what I've had in mind (more akin to Geofabrik but for graphs). If I should look into this, I'll definitely share my findings here.

github-actions[bot] commented 1 month ago

This issue seems to be stale. It will be closed in 30 days if no further activity occurs.