Hi, I am trying to understand the differences between the routes created on Graphhopper Maps
and those created by my Graphhopper service on my server, using the same payload in a POST request: { “points”: [ [ 9.372003, 45.536676 ], [ 9.104767781911379, 45.198305038675926 ] ], “profile”: “my_car”, “elevation”: true, “instructions”: true, “locale”: “it”, “points_encoded”: true, “points_encoded_multiplier”: 1000000, “details”: [ “road_class”, “road_environment”, “road_access”, “surface”, “max_speed”, “average_speed”, “toll”, “track_type”, “country” ] }
The response I get from my server presents a route choice that is almost always nonsensical, avoiding fast roads and generally taking much longer.
Why is there this difference? Perhaps the configuration I have adopted is not correct?
The only way to get better routes is to use a custom model like this:
“custom_model”: {
“distance_influence”: 15,
“priority”: [
{
“if”: “!car_access”,
“multiply_by”: “0”
}
],
“speed”: [
{
“if”: “road_class == UNCLASSIFIED”,
“multiply_by”: “0.4”
},
{
“if”: “road_class == RESIDENTIAL”,
“multiply_by”: “0.4”
},
{
“if”: “road_class == SECONDARY”,
“multiply_by”: “0.6”
},
{
“if”: “road_class == PRIMARY”,
“multiply_by”: “0.7”
},
{
“if”: “road_class == TERTIARY”,
“multiply_by”: “0.5”
},
{
“else”: “”,
“limit_to”: “car_average_speed”
}
]
}
However, doing this results in much longer response times, sometimes 30-40 seconds per request if the route is fairly long. How can I pre-generate the data so that I don’t have to use a custom model in the payload? Is it possible? Thank you in advance for any suggestion