[OSRM-talk] Fixing routing with tags

Nils Nolde nils at gis-ops.com
Mon Dec 11 12:25:40 UTC 2023


Hi Florian,

I understand your problem, but personally I'd not be in favor of such an approach (and not only bcs of "don't tag for the router"). The effect it would have in a particular routing engine would be similar to today: it depends. So it wouldn't make things more consistent and you'd still find the same problems you have today. But more importantly, this seems like a very heavily subjective choice to make for a single mapper who has no idea how exactly that extra cost is implemented in any engine, which is eventually what he'd like to get out of it.

IMO this needs to be solved with conventional tagging and/or heuristics (increase penalty to switch to lower hierarchy roads, less turns or such). I'm missing the argument why you think those routes are bad. I guess it's because they're taking a shortcut on lower-level roads instead of staying on the high-level roads? Sounds similar to dive-bombs (classic: during congestion, take the off-ramp only to join the highway 1 km further on the on-ramp, just to save 5 mins of the traffic jam). Essentially that IS the cheapest route, but you (and me too) consider it asocial behavior to have through traffic take those residential roads just to save 2 seconds. So we'd need to cost those way segments more or the transition onto those.

That can be done in various ways. Either one can set a (pretty hard IMO) "destination" tag there so thru traffic is penalized or even disallowed. But that would probably clash with the legal situation of those roads and mappers would hate it as it's again "tagged for the router". Ideally routing engines try their best to avoid those dive bombs. I didn't really look into all Valhalla code regarding this specifically. Rather than here on the (pretty inactive) OSRM dev list, I'd encourage you to open an issue with Valhalla, I know we've had similar issues and solved some of them, but for sure the discussion would be livelier (no offense).

All the best
Nils

On 11.12.23 12:53, Florian Lohoff wrote:

> Hi,
>
> Prolog:
> Discuss a generic tag for reducing/increasing route-weights/costs regardless
> of other tags.
>
> For 10 years i am running Routing Quality Assurance by calculating
> routes every 30 minutes and watching their changes over time.
>
> When i add regions to that monitoring i typically go through
> and fix "static errors" where road taggings cause small side roads
> to be used as shortcuts.
>
> Most of the time fixing tagging on the roads and the shortcut fixes
> the issue. I typically tag maxspeed, lanes, surface, lane_markings etc.
>
> But sometimes i have cases where these tags are not sufficient and i
> dont get the relative weight of the routes to the higher class
> road network.
>
> I am missing a generic tag to influence routing in ways like "dont use
> this road as a through road although legally allowed" e.g. make it
> more expensive in routing.
>
> Examples:
>
> The route uses "Im Kracht" where it should stay on K22 and L775:
> https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=52.2340%2C8.5138%3B52.2381%2C8.4837#map=15/52.2354/8.4993&layers=N
> The route uses "Westerweg" but it should stay on K27, L876, L803:
> https://www.openstreetmap.org/directions?engine=graphhopper_car&route=52.2803%2C8.6965%3B52.2890%2C8.7094#map=15/52.2825/8.7106&layers=N
> Dont get into discussions why one engine gets it and the other doesnt.
> We are not talking about routing engine/profile comparisons. I can
> create such a problem in ANY engine and profile just depending on the
> geometries and tags understood in one or the other engine/profile.
>
> So my idea would be to create a tag like **relative_route_cost=** or
> the like which is a float between 0 and 2 where "1" is "use the route
> weight calculated from your route engines physical tag analysis".
>
> So
>
> 0 -> decrease cost of this road to "0%"
> 1 -> Let the cost be the cost of the engines tag analysis
> 2 -> double the cost of the engines tag analysis
>
> This would allow us to directly influence the usage of "shortcuts" or
> through roads used "accidentally".
>
> I would like to not create "routing engine specific" tags like
> **osrm:relative_weight=** or something.
>
> Thoughts?
>
> Flo
> --
> Florian Lohoff
> f at zz.de
> Any sufficiently advanced technology is indistinguishable from magic.
> _______________________________________________
> OSRM-talk mailing list
> OSRM-talk at openstreetmap.org
>
> https://lists.openstreetmap.org/listinfo/osrm-talk

--

Nils Nolde
Developer / Co-Founder
Website: https://gis-ops.com
Email: nils at gis-ops.com
Phone: [+49 (0)178 5161 595](tel +491785161595)
[Mühlenstraße 8 a, 14167 Berlin](https://valhalla.openstreetmap.de/directions?profile=bicycle&wps=13.2618285%2C52.4299717)
[social-icon-github](https://github.com/nilsnolde)
[social-icon-linkedin](https://www.linkedin.com/in/nils-nolde-geophox/)
mailto:nils at gis-ops.com
[social-icon-github](https://twitter.com/gis_ops)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20231211/84ea71eb/attachment-0001.htm>


More information about the OSRM-talk mailing list