Routing going over two sides of triangle intersection instead of taking the single side

There is in intersection of 3 roads: 1 tertiary and 2 unclassified and routing algo takes the long way around. Why is that? Can we somehow influence it to take shorter route? The westernmost road is lower quality that the other two.

Interestingly when endpoints are flipped then it seems to pick to better route.

This seems to happen only when using OSRM, as the other two engines on osm.org take the shortcut.

Routers have a heuristic to avoid changing road class, which is one possibility for why OSRM bypasses that first intersection. On the reverse trip, putting off changing the road class (getting onto the tertiary) until as late as possible results in taking the shortcut.

Routers generally have debug modes where they’ll print a lot more data, but it’s not visible from osm.org. On OSRM’s debug map for this location you can see it assumes the tertiary can be traversed at 48 km/h and the unclassified at 25 km/h, so it might be faster to stay on the tertiary. It also shows that the score penalty for turns onto and off the shortcut is 0.0 (I would guess due to the shallow angle), for the right-angle right turn off the tertiary it is 1.3, and for the left turn onto the tertiary it is 4.3. That last detail might be why it prefers to take the shortcut on the way back.

OSRM at least seems to assume that the two unclassifieds have the same quality. They are tagged the same in OSM right now. If you can quantify the “lower quality”, you can tag that in OSM. Is it narrower? Bumpier? Is the Relocation Road a more built-up surface?

2 Likes

I would start from more detailed tagging of surface

unpaved is anything from sand through gravel to compacted

See Key:surface - OpenStreetMap Wiki

in which way? likely it is taggable and routers would be given direct info rather than trying to guess

maybe this router assumes that lower class road with unpaved may be more likely to be sand or mud and is desperate to avoid it.

(note: no promises that this specific router will change its behaviour, but being more specific in tagging would help. Note that router may take week or two to update after the edit.)

Anutz Hookup is worse than the rest, all of them are gravel roads, smae class just the one seems to be a little less maintained and more narrow.

Narrower, less maintained, more bumpy. Same class because all of them are gravel roads. Also the Relocation road is similar quality as the Zeballos.

Please take a look at Key:surface - OpenStreetMap Wiki and confirm if you mean “gravel” in the OSM sense, or if another value matches it better?

Same as this: https://community-cdn.openstreetmap.org/uploads/default/original/3X/b/4/b4a182f9ecbd4888a40a21cce9eae5c546e3d597.jpeg

‘Compacted’ seems to be the best description.

Yes, see Tag:surface=gravel - OpenStreetMap Wiki and Tag:surface=compacted - OpenStreetMap Wiki

I would try adding Key:smoothness - OpenStreetMap Wiki info

Zeballos and Atluck are similar quality so why one is classified as 48km/h and the other one as 25km/h? Also the official speed limit on Zeballos is 60km/h.

Hookup is same compacted class, just a little worse, also goes uphill from north to south while Atluck is level in this part. Taking the longer route leads uphill to go downhill to the same level right after.

Where exactly you see 48km/h and 25 km/h?

Speed limits are not tagged in OpenStreetMap, only incredibly vague surface is tagged - so routers are trying to guess.
If more precise info will be tagged then there is chance that guesses may improve.
Or at least it will turn out to be router’s fault and bug report can be filed.

If you are familiar with this roads - you can try to provide more info by mapping in OpenStreetMap.
LLM may exist nowadays but routers are not reading this thread.

Added more specific surface tags: Changeset: 169375489 | OpenStreetMap

48 km/h and 25 km/h are speeds that OSRM assumes for roads in question, see OSRM’s debug map for this location

1 Like

It looks like my changes are deployed to maps, but OSRM selects exactly same route as before. The debug view also shows exactly same road speeds assumed.

Does OSRM use some older snapshot or maybe my changes made no impact?

Is there some other forum where I can ask how OSRM calculates road graph weights?

It can take a few days for data changes to propagate to routers.

See https://routing.openstreetmap.de/about.html for information about the OSRM routing server used on osm.org.

http://map.project-osrm.org/timestamps/ shows when the routing data was last updated

The routing profiles for that server are hosted here:

2 Likes

as mentioned