Repository navigation
OSM area processing obeys tag mapping - #6164
Conversation
Walkable area builder used hardcoded bike+pedestrial default permissions for area edges. Now default permissions take tag mapping into account.
Rule whicgh assigns pedestrian permissions to transit platforms is not enough, because another rule which contains more tags overrules it.
OSM tag mappers now use normal OOP inheritance. It is usually a bad idea to implement classes directly from an inteface.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6164 +/- ##
=============================================
- Coverage 69.95% 69.75% -0.20%
+ Complexity 17756 17658 -98
=============================================
Files 1999 2006 +7
Lines 75500 75571 +71
Branches 7728 7734 +6
=============================================
- Hits 52813 52718 -95
- Misses 20013 20140 +127
- Partials 2674 2713 +39 ☔ View full report in Codecov by Sentry. |
|
About your second point, this kind of fuzzy matching has caused me problems before, so I added It think it could be helpful here. There was talk about making it the default but we were scared of the unintended consequences. |
|
I wonder if absence of a tag in BestMatchSpecifier should actually reduce match scores? Less than conflicting value but something at least. |
|
I find |
Instead of adding competing best match rules, start using the well designed exact match specifier. This may cause some unexpected changes but as the change concerns only one specific rule, we should be able to deal with them,
|
And you need to resolve the conflicts. |
| .getOsmProvider() | ||
| .getWayPropertySet() | ||
| .getDataForWay(areaEntity); | ||
| wayData = areaEntity.getOsmProvider().getWayPropertySet().getDataForWay(areaEntity); |
There was a problem hiding this comment.
This way vs area thing here is slightly confusing, but I think it's a common problem that we use these way properties for areas as well so if we were to rename things, we would need to rename a lot of things.
There was a problem hiding this comment.
It's a bit unfortunate that we now lose all history on this file but since we are combining two files, I think it's impossible to avoid some history being lost.
Summary
OSM parsing and graph building code always applied hard coded bicycle and pedestrian permissions to areas. Now the code uses the configured wayPropertySet and national tag mapping to define the permissions.
Secondly, detailed propertly rule for
highway=footway;bicycle=yes;area=yestag combination overruled simpler rules like plainhighway=footwaybecause the former rule often has more matching tags. This is a bit surprising because absence ofbicycle=yestag does not reduce scores. This problem is fixed by using ExactMatchSpecifier.Thirdly, OSM tag mapping is a typical example of a situation where OOP works very well. Class hierarchy is now refactored to use very simple inheritance with a base class and national sub classes.
Issue
Closes #5354
Unit tests
Area permission tests for Finland and Germany tag mappers added.
Documentation
Updated.