Wrong directions using local backend


I successfully installed a local backend with docker, configured it with a PBF extract for Spain, and everything seems to be working fine, but the thing is that I’m getting different, worse directions than with api.openrouteservice.org. In both cases I’m using the same query params, profile, options and restrictions. The only thing I can see making a difference is the PBF file… I tried downloading the spain-latest.osm.pbf from different sources but the result on the local backend is always the same. The app.config is the default one… What else should I check?


Here is an illustration of my problem:

On the left is the route I get with my local backend, and to the right is the one from api.openrouteservice.org. As you can see, the localhost solution is doing something weird, avoiding the most logical route.


Hi @jaimevives ,

can you provide the query that is made (omitting your api key) as it is difficult to see what is going on without knowing the start and end coordinates.


Hi Adam:

Thanks. This is the query:


Using that query against api.openrouteservice.org I get an optimal route, but against my local backend (with default app.config), I get a weird route, as seen on the image.


OK, I’ve had a look and I believe it is because of some differences between the configuration that is used in the local install and the one that is used in our live API. Inside the configuration we turn on some code that updates the speed stored by trying to take into account acceleration. By default, the configuration that is on github has it turned off, but when I turn it on, I get the same response as in our live API.

So you can try turning that on by modifying the app.config that is in the ./conf folder so that under "encoder_options" of the "profile-hgv" object it has "...|use_acceleration=true" and then see if that makes the routing better. After changing the config file, you need to delete the contents of the ./graphs folder and then take the container down and bring it back up again for the changes to take effect. You should be aware though that there are some instances where the acceleration functionality makes routes worse than without it, so just keep an eye on it.

Yes, that was it! Many thanks, Adam… will keep an eye on it, as you said, but at least for this route using “use_acceleration=true” gives the optimal result.