From the route, you can see that by default, Graphhopper does not take the optimal route. When I tried to set distance_influence to 10000, there was no change, but when I set distance_influence to 10000, it became what I wanted. I don’t understand why?
I don’t understand the question.
Was there no change or did the route become what you wanted when you set distance_influence to 10000?
Also what do you consider an ‘optimal’ route here?
I’m sorry I made a mistake, I meant “When I tried to set distance_influence to 200, there was no change, but when I set distance_influence to 10000, it became what I wanted”. It is very obvious that the second map has a shorter time and distance than the first map. Why is it not the optimal route?
The foot profile prefers certain road types (like ‘track’ here) over others (like ‘tertiary’), also depending on the maps information about sidewalks etc . But I agree that in your example the large stretch on the track through the desert might be unwanted. Did you find more such examples? If you raise the distance_influence
value these road-type preferences will be overruled by the sheer distance of the route at some point. In this case the shortest route will be chosen.