-
Notifications
You must be signed in to change notification settings - Fork 122
Potential false positive class 11 (stop order) in analyzer relations_public_transport on (bus) routes using way twice #2489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think you are right. Do you have idea to fix that ? cc @nlehuby |
I have already proposed a fix to this : #1274 |
Thanks! So if I understand correctly a performance issue is holding back that PR? If that works it seems like an elegant fix with minimal code change :) How does it work exactly? I've read the documentation on ST_OffsetCurve but wouldn't the returned line be the same for the ways that are used twice and the stops still have the same relative position on that line? |
Well done for understanding how the analysis works and for identifying this issue, this sql is particularly tricky! The offset depends on the direction (the line is oriented), so the offset is different on the first and return parts. |
Ah thanks, that's a great solution if the performance issue can be tackled. I see the PR is quite old, maybe the situation has improved in recent versions of PostGIS? |
Uh oh!
There was an error while loading. Please reload this page.
Sorry if this is a known issue but couldn't find an existing GitHub issue.
I have noticed that Osmose reports "The stops may not be in the right order" on some local bus route relation that I changed (I only splitted some road that is part of the bus route so now I am the last modifier of the relation).
After some research I found the analyzer and tried to understand what is doing to determine the expected stop order. The analyzer is: https://github.com/osm-fr/osmose-backend/blob/dev/analysers/analyser_osmosis_relation_public_transport.py
The temp table that is constructed to facilitate comparison of stop order in relation and on route line geometry is:
Running the Osmose backend on Monaco (as per the docker sample) luckily also encounters this issue so I can inspect the data by running the query myself.
Two example of route where this error class is reported:
https://www.openstreetmap.org/relation/2214023
https://www.openstreetmap.org/relation/2211942
What those routes have in common is that that the bus loops after the start so the line will overlap itself (same way is in the relation twice). This results in the first stops having an unexpected value for ST_LineLocatePoint. Using another temp table I can show the values of this function for each stop on route 2214023:
Saint-Roman is expected to the first on the line geometry as it is close to the starting coordinate of the first way in the relation but I suspect that
ST_LineLocatePoint
finds it further on the line as the route passes this point again? Without local knowledge I can't tell if the stop order in the relation is correct but it seems alright as it aligns with the order of the ways in the relation.The same thing happens with route 2211942
To conclude my question:
Are these false positives or am I misinterpreting the data and is the stop order indeed incorrect?
The text was updated successfully, but these errors were encountered: