Route is showing to drive around not straight. What could it be?

Hi. I am testing routing service and I am getting routes like this sometimes. I know I can drive straight there, but it shows some weird drive around. What is causing this and is there a way to fix it? I would assume it that it could be because road could have been closed in that part at some point? This is a second place I see something like this.

      'coordinates': points.map((e) => [e.longitude, e.latitude]).toList(),
      'profile': 'driving-car',
      'format': 'geojson',

Here is the second one.

Hey,

there is a few things going on in the first example:

  • the main road is split into 3 sections. Thus, our heuristic meant to consider vehicle acceleration after a turn might actually lead to a slower time.
    There are a few issues connected to this:
    Issues related to acceleration :chart_with_upwards_trend:
  • the main road has the surface:sett tag set, which reduces the maxspeed to 30.
  • the detour roads are tagged as highway:service with surface:asphalt
    The detour thus might evaluate as faster if it runs along streets with higher speed assignments.

I’d assume the second example is also related to something with acceleration.

2 Likes

Thanks. That clears up things a bit!

1 Like

Is there any parameter to change that could fix it? Like shortest path or something like that?

Hey,

you can of course use the shortest preference, but that will alter the route quite a bit, I suppose.
Apart from that, there is currently no option to not do that, I fear…

Best regards