[GIS] Using custom data in OSRM

open-source-routing-machinerouting

I have my own routing server that uses OSRM as an routing engine. (I used this toturial.)

I want to be able to add my own data (roads) and include that data in the routing.

So in the beginning I thought to add my data in the OSM format (node, way, relation) with an id that doesn't exist in the xml file to the osm.xml file that the OSRM uses to route. But that will mess up the id's coming from the OSM server in case of updating the data (diff).

So now I'm wordering if there is any way to use OSRM with my own data.

Best Answer

If you only want to use your own data, I would suggest writing a script that converts it to the OSM XML format. We have done this in the past with proprietary data sets and it works fine (albeit you might consider writing out the PBF format if the data size is very large).

Merging OSM and non-OSM data is whole different story. That is nothing that can be solved on the OSRM side. Can you give more details on the nature of your data? Can it be added back to OSM? Does it contain own geometry or just remove geometry (you could disable specific roads in the profile)?

Related Question