Problem with "turnCosts=true" on Android

Hello guys!
I am using graphhoper 0.6 in my Android app. And I got problem, that I can’t solve, can you please help me with advices.
When I am using “graph.flagEncoders=car” without “turnCosts=true” and “prepare.chWeightings=no” it works correct.
But I need to implement turn restrictions.
So I am using these properties:
graph.flagEncoders=car|turnCosts=true
graph.dataaccess=RAM_STORE
prepare.chWeightings=no
It’s ok, I get edges, geometry, location_index, names, nodes, properties, turn_costs. But in my application I get exception:
E/AndroidRuntime(26221): Caused by: java.lang.IllegalStateException: Configured graph.chWeightings: [fastest|car] is not equal to loaded []
What is [fastest|car]? I turned off speed mode using “prepare.chWeightings=no”. Can someone help me with this problem?
Sorry for my bad English.

To play with turn costs you did right and used the flexibility mode by disabling CH.

But when you load the graph in your app, did you use the same settings as when you created it?
i.e. graphHopper.setCHEnable(false);

Emux

2 Likes

Big thanks!!
I lost 2 days and almost lost my hope. You saved me! :slight_smile: