Route changed why?

{
  "points": [
    [
      12.57840,
      48.85840
    ],
    [
      12.56120,
      48.90560
    ]
  ],
  "snap_preventions": [
    "motorway",
    "ferry",
    "tunnel"
  ],
  "details": [
    "road_class",
    "surface"
  ],
  "profile": "car",
  "locale": "en",
  "instructions": true,
  "calc_points": true,
  "points_encoded": false
}

Im wondering why the route changed. It was shorter like just 7km straight through the city, not its using the highway 12km.

When is the last time you remember the shorter 7km long route was chosen? It still appears as alternative: GraphHopper Maps | Route Planner

@easbar must be as least the 11th of september last year.

Generally, this can be due to changes in OSM data or data modelling on our side. Is there a specific reason why you’d prefer one route over the other and are there more cases of this kind?

Not sure if this is related but for some reason Google does not allow branching off B8 to the right: https://maps.app.goo.gl/jaCEjiDwazBGHmjE7. Apparently it assumes this is a one way road (indicated by a little arrow on the map), even though according to street view it is not: https://maps.app.goo.gl/ZZ1rdWuJ9Nf1LhYa8

I would prefer this route because its shorter, while taking just a bit more time. Would consider this as the more efficient route.

I saw the difference in google as well, but this must be a mistake.

You can set a preference for shorter routes using the distance_influence parameter like here

The corresponding POST request would look like this:

{
  "points": [
    [
      12.57840,
      48.85840
    ],
    [
      12.56120,
      48.90560
    ]
  ],
  "snap_preventions": [
    "motorway",
    "ferry",
    "tunnel"
  ],
  "details": [
    "road_class",
    "surface"
  ],
  "profile": "car",
  "locale": "en",
  "instructions": true,
  "calc_points": true,
  "points_encoded": false,
  "ch.disable": true,
  "custom_model": {
    "distance_influence": 30
  }
}

However, this requires disabling CH which affects the response time.