Weird road selection for route

Hi,

I am using the open source routing engine, with no modifications to the existing code, the roads it is choosing for the route are unusual and would not be used in a real world situation.

Any idea what could be the cause of this?

I have validated the directions sent back from Graphhopper to rule out this being an issue with mapping the route.

I am using “OSMulti-modalRoutingNetwork” road data directly from the ordnance survey, using our previous routing component and the same road data, the route was correct.

Below is the route provided from Graphhopper maps which is correct.

What vehicle model are you using in your config? Did you enable turn restrictions?

(Sharing the config file itself may help)

Hi,

Thanks for the reply, i am just using the standard Car profile and config with no changes.

I uncommented the turn restrictions in the config-example.yml and receive this error.


These are my car.json configs

I have cleared the cache and still receive the error when running. Other than the config-example and car.json where else do i have to verify the configurations match?

If you delete the graph-cache folder and restart there won’t be a ‘Profiles do not match’ error.

I’m not sure I understand. Do you use unmodified open source GraphHopper (which version)? And which data source (is it OSM)? The route you showed in the first screenshot looks very strange indeed. It neither chooses the shortest way between start and end, nor does it stay on the main road network.

Hi,

Perfect i have fixed the “Profiles do not match” error.

I have downloaded the open source (GitHub - graphhopper/graphhopper: Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.) launched in IntelliJ with no code changes so the route is running through the default open source code.

I use the latest OS road data provided directly from (OS Open Roads | Data Products | OS), This mapping data is correct as with other routing component we receive accurate routes.

I’m assuming its 10.0.2 version of Graphhopper, although i don’t use the pre-built JAR i run the server through IntelliJ via the code.

Ok. I am not familiar with the Ordnance Survey data. To make it work with GraphHopper you probably need to adjust the weighting according to it’s schema.

Do you have any links to OSM data you’d recommended so i can import and verify if that’s the problem to my route?

As for updating the weighting according to the schema do you have any examples of this? Are we talking about the “CustomWeighting.java” calculating the weight for each edge?

“public double calcEdgeWeight(EdgeIteratorState edgeState, boolean reverse) {”

In addition, i have turned on the turn cost in the config for the car profile, now my import gets stuck and never continues stuck within the “Park” function for the thread.

I noticed a good majority of my nodes where hitting this exception and returning,

image

i replaced this line with “weight = MIN_WEIGHT” to force it to continue which resulted in the import getting stuck