Repository navigation
Conversation
| @Override | ||
| public AccessValue getAccessValue(String highwayTag, TransportationMode transportationMode, AccessValue _default) { | ||
| return AccessValue.ACCESSIBLE; | ||
| return _default; |
There was a problem hiding this comment.
This is a breaking change, but the behavior before didn't make sense if you want to block something by default and only allow it for certain areas. If there was no rule for the area, it always returned accessible and not the _default.
Will add this to the changelog.
| } | ||
|
|
||
| @Override | ||
| public AccessValue getAccessValue(String highwayTag, TransportationMode transportationMode, AccessValue _default) { |
There was a problem hiding this comment.
I think this method is a bit limited, we should think about passing the ReaderWay, this would allow us to make more complex decision also using other available tags, for example: designation=public_bridleway, which is a relevant tag for bridleways in the UK, but not for other countries, see here.
|
I just found an issue with this approach. So far I only tested it in GB which worked. But I just tried it in Germany and it didn't work in Germany. It turns out the issue is that we only set estimated_center after we call We could also calculate the estimated center, before accepting the way. Calculating the estimated center is not that expensive. Calculating the distance is a bit more expensive so we can move this after we accept the way? |
|
I think we need rewrite this to the new concepts in mind (RoadClass.BRIDLEWAY). Or should we close here? Also it might be that the issue with the center or way_start_point is no longer a problem as the SpatialRuleParser should handle that (I hope). |
|
Maybe a full rewrite would be better than reusing this PR. I think that the bridleway situation is something we should improve.
The SpatialRuleParser should happen after the acceptWay? We should know where a bridleway is in order to decide if we can accept it. Alternatively, we could accept all bridleways at first and in handleWayTags we set it as not accessible if it's in certain countries? |
Yeah, probably in general I think we should remove the acceptWay method. I'm not sure it is really faster with it. |
Ok |
Fixes #469 and #504.
I added WIP since the bike routing is not yet implemented, should be quite easy though.
For now I only decided to allow routing over bridleway in GB and not in other countries, most countries like Germany are rather restrictive about bridleways, so we should probably see how this feature evolves and maybe add another country at a later point if needed.
Here is one example in GB.


This PR:
GH Maps: