Skip to content

De-duplicate boardinglocations on areas#7508

Open
MaxGosau wants to merge 3 commits intoopentripplanner:dev-2.xfrom
HBTGmbH:deduplicate-boardinglocations-for-areas
Open

De-duplicate boardinglocations on areas#7508
MaxGosau wants to merge 3 commits intoopentripplanner:dev-2.xfrom
HBTGmbH:deduplicate-boardinglocations-for-areas

Conversation

@MaxGosau
Copy link
Copy Markdown
Contributor

@MaxGosau MaxGosau commented Apr 9, 2026

Summary

when two stops reference the same OSM platform area (via ref:IFOPT), only one OsmBoardingLocationVertex centroid is created for that area and both stops are linked to it. This ensures that transfers on the same platform can always be reached (0-min transfers).

Issue

the issue was previously discussed here: #7240
this PR implements the "Quick fix" outlined by Jessica

The Sollution uses a simple HashMap to ensure that only one OsmBoardingLocationVertex gets created for each stop connected to an area.

This will have an impact on all transfers using the same OSM Area
Before:
image
After:
image

The main difference being, that there is no longer a footpath in the resulting itinerary (instantaneous transfer).

Some minor refactorings to OsmBoardingLocationsModule were also added in a seperate commit: (Refactor OsmBoardingLocationsModule for simplicity)

Unit tests

One of the existing unit test cases uses an example in Herrenberg, which already included an OSM area with 2 stoppoints, so only a new testcase was added, to verify the de-duplication

Documentation

  • javadoc added on factory method and test

@MaxGosau MaxGosau requested a review from a team as a code owner April 9, 2026 10:55
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.32%. Comparing base (1158ac0) to head (514f5f9).
⚠️ Report is 26 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...aph_builder/module/OsmBoardingLocationsModule.java 96.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #7508      +/-   ##
=============================================
+ Coverage      71.02%   71.32%   +0.29%     
- Complexity     21002    21146     +144     
=============================================
  Files           2352     2357       +5     
  Lines          87266    87552     +286     
  Branches        8635     8660      +25     
=============================================
+ Hits           61983    62446     +463     
+ Misses         22293    22101     -192     
- Partials        2990     3005      +15     

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MaxGosau MaxGosau added the !Improvement A functional improvement or micro feature label Apr 9, 2026
@jessicaKoehnke
Copy link
Copy Markdown
Contributor

Maybe it would be better to use the Platform as a key in the map, then the deduplication can also be used for edges. Or is there a reason not to do that?

@MaxGosau MaxGosau force-pushed the deduplicate-boardinglocations-for-areas branch from 3457c6e to 514f5f9 Compare April 13, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Improvement A functional improvement or micro feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants