Repository navigation
Conversation
| */ | ||
| public interface CountryRule { | ||
| default RoadAccess getAccess(ReaderWay readerWay, TransportationMode transportationMode, RoadAccess currentRoadAccess) { | ||
| default CarRoadAccess getAccess(ReaderWay readerWay, TransportationMode transportationMode, CarRoadAccess currentRoadAccess) { |
There was a problem hiding this comment.
getCarAccess(ReaderWay, CarRoadAccess)Otherwise we would need to come up with a generic approach for the various RoadAccess enums in order to make use of the passed TransportationMode.
There was a problem hiding this comment.
btw why do we want to split the RoadAccess enum? I understand that some values only make sense for certain transportation modes but keeping them in a single enum keeps interfaces like this one a lot cleaner.
There was a problem hiding this comment.
The most important reason is that currently road_access is car-centric (i.e. renaming it to car_road_access is basically only a clarification) and there is no such solution for bike or foot or other transportation modes. See #2819.
One important immediate result is that with that we can configure the private access via a custom model configuration instead of putting this into the encoded value configuration. See #3076.
(And isn't this the same as you asked for in #2460?)
Otherwise we would need to come up with a generic approach for the various RoadAccess enums in order to make use of the passed TransportationMode.
Yes, I think this is exactly the problem we have atm and the country-rules are just car-based, but this should be changed at a later time as indicated by my "follow up".
Use
car_road_accessinsteadroad_accesseverywhere.Based on #3056.
Note that for consistency the
car_road_accessmust containMISSINGbut it should not be added toroad_accessas the meaning of YES would be changed, which is important for custom_models.TODO: maybe better get rid of MISSING (like partially done for
toll) and set the default access like dismount/yes/no for the different highways (e.g. highway=path/pedestrian/footway isdismountor for motorway it isnoetc).