Customized Maps

Hi All,

I am wondering if OSM map data (with .pbf format) is the only type that can be used with our own ORS instance?

Is there any way to provide customized maps (following certain formatting instructions) to make ORS working? (a hypothetical network for example).

How hard it would be to modify the source code to read data from somewhere else rather than OSM. Is there any specific part that maybe can modified to make it customizable to a certain format of map data?

Thank you

Currently ors can only read in .osm and .pbf files.

The easiest way of using your own road data is to convert it to osm format which can then be read into ors (either .pbf or .osm format). There are a number of tools available for doing that, such as GitHub - tyrasd/geojsontoosm: Convert GeoJSON to OSM XML which works pretty well at converting geojson data to osm format. Normally though you also need to make sure that the properties of the features map to the tags that would be used in osm data (e.g. there is a highway: primary property for a primary road).

The main thing to be aware of is that many tools will create features with ids and refs as negative integers (is in osm that would indicate a feature that has not yet been added to the osm database), but for them to work in ors, they need to be positive integers. A simple way around that is to open the created osm file in a text editor and then do a find and replace to convert all id="- to id=" and ref="- to ref=", thus removing the negative aspect but maintaining the relationships between nodes and ways.

Of course it would theoretically be possible to modify the ors/graphhopper code to read in the different file formats, but that would likely be a fair amount of effort.

Hi Adam, Thank you very much for your great help. I could manage to run ORS with my own data after converting it to .osm format and revising the negative ids. I used ogr2osm which was very easy to work with.

However, during the setup of the ORS server with the new network, I get a warning which is as below:

landmark 30 ({lat},{lon}): too many weights were maxed out (44077/49369). Use a bigger factor than 2.095371809126498. For example use maximum_lm_weight: 253510.4376816512 in your LM profile definition.

Can you explain what is actually this warning and how can I maybe fix it?
Despite the appearance of this warning, the server seems to be running and responding to requests.

Thank you.

I have no idea about the warning message - that’s a bit too low level in the algorithms for my knowledge… maybe someone who knows about the algorithms could give a little explanation.

But great that you managed to get it up and running none-the-less

The error is related to the ALT and core-ALT routing algorithms, which store distances to so-called land marks. As these distances consume a lot of space they are stored up to a specific precision that is given by the factor mentioned in the error message. This factor is estimated automatically during graph building. Maybe the estimation heuristic fails to estimate a good value for your data set.

Currently, it is not possible to set the factor to manually. To investigate this issue, it would be helpful If you could provide your config file and maybe a small sample data set on which the issue happens.

@andrzej FYI

2 Likes