osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

Multi-value access tag parsing / Disallow ways with unknown values in access values

Open flohoff opened this issue 1 year ago • 2 comments

Hi,

In car profile we currently dont support multi-value access values e.g. "forrestry;agricultural" which causes OSRM to use all those roads instead of making them inaccessible.

This is caused by a) OSRM not splitting access values, and b) whitelisting all unknown values.

I think both of these decisions need fixing. We should split the access values and process the elements individually, and unknown values should be treated as inaccessible.

Here is a patch against the car profile and the way handler to fix both issues. The restriction positive list is kept in place so delivery, destination and the like are restricted.

Positive list only contains "yes" and "permissive"

https://github.com/Project-OSRM/osrm-backend/commit/bd6a2eb05bd5ba8b6857ce41c8df230641c61053

Flo

flohoff avatar Jan 03 '24 12:01 flohoff

Okay - so i brute forced ~500k routes in a county around me and checked for differences between the profiles using https://github.com/flohoff/routecompare

I found these tag value/combinations which caused differences.

vehicle=designated
access=residents
access=unknown
motor_vehicle=agricultural;forestry
motorcar=designated access=private
access=employees

So i would propose to add "designated" to the positive access tag value whitelist. All others where expected good changes.

Flo

flohoff avatar Jan 03 '24 13:01 flohoff

I enabled the patch in my RouteQA. Of ~200K routes in whole of Northrhine-Westfalia i am monitoring right now i had 2 roads which came out of the change in profile.

One was a road where someone confused access:lanes:backward with access:backward https://www.openstreetmap.org/way/899499339/history

The other was a road containing an motor_vehicle=Trucks prohibited. https://www.openstreetmap.org/way/52130179/history

Flo

flohoff avatar Jan 03 '24 16:01 flohoff