Skip to content
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

Process boarding location for OSM ways (linear platforms) #6247

Merged
merged 18 commits into from
Jan 15, 2025

Conversation

miklcct
Copy link
Contributor

@miklcct miklcct commented Nov 11, 2024

Summary

This adds the processing of boarding locations on linear platforms.

Fixes #6056

Unit tests

added

Documentation

None

Bumping the serialization version id

No longer needed

@t2gran t2gran added this to the 2.7 (next release) milestone Nov 12, 2024
@leonardehrenfried
Copy link
Member

leonardehrenfried commented Nov 12, 2024

We talked about this today and we came to the conclusion that we want to introduce a data structure that is available during graph build only and then discarded. Lets discuss this in a meeting.

@miklcct
Copy link
Contributor Author

miklcct commented Nov 12, 2024

Does moving the LinearPlatform field into StreetEdge and marking it as transient achieve the above, and avoid a serialisation bump?

@leonardehrenfried
Copy link
Member

Unfortuntately not. We want to design a new system for keeping information that is used during graph build only and then discarded.

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 86.77686% with 16 lines in your changes missing coverage. Please review.

Project coverage is 69.84%. Comparing base (0fb152d) to head (35f8b5d).
Report is 73 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...aph_builder/module/OsmBoardingLocationsModule.java 92.53% 2 Missing and 3 partials ⚠️
...rg/opentripplanner/graph_builder/GraphBuilder.java 0.00% 3 Missing ⚠️
...ner/standalone/configure/ConstructApplication.java 0.00% 3 Missing ⚠️
..._builder/module/configure/GraphBuilderModules.java 0.00% 1 Missing ⚠️
...o/internal/DefaultOsmInfoGraphBuildRepository.java 87.50% 1 Missing ⚠️
...info/internal/DefaultOsmInfoGraphBuildService.java 80.00% 1 Missing ⚠️
...n/java/org/opentripplanner/standalone/OTPMain.java 0.00% 1 Missing ⚠️
...pplanner/standalone/configure/LoadApplication.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6247      +/-   ##
=============================================
+ Coverage      69.79%   69.84%   +0.05%     
- Complexity     17943    17976      +33     
=============================================
  Files           2046     2049       +3     
  Lines          76685    76756      +71     
  Branches        7829     7832       +3     
=============================================
+ Hits           53520    53608      +88     
+ Misses         20423    20412      -11     
+ Partials        2742     2736       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@miklcct miklcct marked this pull request as ready for review December 5, 2024 15:54
@miklcct miklcct requested a review from a team as a code owner December 5, 2024 15:54
@habrahamsson-skanetrafiken
Copy link
Contributor

@t2gran will come with some suggestions of how to solve this without adding anything to the serialized graph.

@t2gran
Copy link
Member

t2gran commented Dec 13, 2024

There is one thing I do not understand here. Is it true that in the OSM model the boarding reference can be on both way and node, and that it is only on Vertex in OTP? If so, why are we not just coping the boarding references to the vertexes it is connected to?

I think the correct behavior for the routing would be to "arrive at the stop" when you arrive at one of the vertexes included in the platform.

@miklcct
Copy link
Contributor Author

miklcct commented Dec 13, 2024

I think your behaviour is correct but it isn't supported even for the area platforms yet. The centroid is currently calculated and used.

Maybe I should try to connect the stop to every vertexes instead (and also do it for area platforms as well)

@t2gran
Copy link
Member

t2gran commented Dec 13, 2024

I am almost done with storing the refs between builders, so I will publish that here when I am done. Lets, discuss this on Tuesday again. I would like some feedback from the "AStar experts" on how to NOT model a stop as a point? This is likely to be a bigger refactoring, but for some stops modeling it as a point is problematic.

…modules

The Repository and Service is not available during routing, only during
the graph build.
@t2gran
Copy link
Member

t2gran commented Dec 17, 2024

Here is how you can excange data between builders - the data is persserved during serialization:

3825a02

@habrahamsson-skanetrafiken habrahamsson-skanetrafiken requested review from vesameskanen and removed request for vesameskanen December 17, 2024 10:11
Copy link
Contributor

@vesameskanen vesameskanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me. I wonder if linking the platform centroid to all edges of a linear platform would be a more straightforward solution; now the code links the centroid with a subset of close enough edges. This not a problem, though, just a bit more complexity.

I agree on what Leonard stated about splitting the node-way-area linking to 3 separate functions.

@leonardehrenfried leonardehrenfried changed the title Process boarding location for linear platforms Process boarding location for OSM ways (linear platforms) Jan 15, 2025
Copy link
Member

@leonardehrenfried leonardehrenfried left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, thanks!

Copy link
Contributor

@vesameskanen vesameskanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite useful functionality! I will next make some fixes to area boarding location linking.

@leonardehrenfried leonardehrenfried merged commit e61f455 into opentripplanner:dev-2.x Jan 15, 2025
5 checks passed
t2gran pushed a commit that referenced this pull request Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Boardinglocations on ways don't seem to work as expected
5 participants