Remove unconnected walking areas from graph - #4981
Conversation
…essing This prevents stops from getting linked to graph parts to be removed later.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #4981 +/- ##
==========================================
Coverage 63.90% 63.90%
- Complexity 13501 13502 +1
==========================================
Files 1674 1674
Lines 66152 66156 +4
Branches 7155 7156 +1
==========================================
+ Hits 42274 42277 +3
- Misses 21492 21495 +3
+ Partials 2386 2384 -2
... and 3 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
|
Under what circumstances does this happen? Is it an error in OSM or a bug of the walkable area code? |
|
This usually happens in OsmBoardingLocation linking with a public transit platform. If the platform has simple shape like 4 point square (i.e. no convex points) and no entrance to platform area (unconnected area), the area gets no visibility vertices at all. In my opinion, that is not a bug but a correct result. When trying to link a transit stop to this kind of area, absence of visibility points means that no connecting edges will be created. However, OsmBoardingLocation module adds some BoardingLocationToStopLink edges to the transit stop. Because of these links, island pruning thinks that stop is linked and does not relink it. Instead of fixing such link errors, it seemed best to remove faulty areas. |
|
And the best fix is to add an entry in OSM, isn't it? |
|
Yes indeed. There will be an UnconnectedArea issue in the report, but this is the automated fix before data gets fixed. |
Summary
Walkable area builder is able to detect unconnected areas, but left them in the graph. Such areas often lack so called visibilityVertices, which are required when linking stops to areas. The result was that some isolated graph edges got linked with the stop, and island pruning did not discover to relink such stops after removal of the area.
It seems best to remove bad areas as soon as they get detected, instead of adding more complex code to deal with various linking problems. This PR does the required change.
Attached is a picture of a ferry platform, which got detached from the graph due to this bug.