Skip to content

Flex transfers in debug UI#7661

Merged
leonardehrenfried merged 5 commits into
opentripplanner:dev-2.xfrom
leonardehrenfried:flex-transfers-debug
Jun 22, 2026
Merged

Flex transfers in debug UI#7661
leonardehrenfried merged 5 commits into
opentripplanner:dev-2.xfrom
leonardehrenfried:flex-transfers-debug

Conversation

@leonardehrenfried

@leonardehrenfried leonardehrenfried commented May 27, 2026

Copy link
Copy Markdown
Member

Summary

Adds a layer in the debug UI to visualize transfers between area and regular stops.

It looks like this:

Screenshot From 2026-05-27 10-49-20

This is a particularly nice-looking one. They can also look like this:

image

Unit tests

Added.

@leonardehrenfried leonardehrenfried requested a review from a team as a code owner May 27, 2026 09:19
@leonardehrenfried leonardehrenfried added the +OTP Debug UI OTP bundled client, the OTP server is normally not changed label May 27, 2026
@leonardehrenfried leonardehrenfried force-pushed the flex-transfers-debug branch 2 times, most recently from c3d4caa to 05de1ef Compare May 27, 2026 09:23
@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.50000% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.08%. Comparing base (1fee988) to head (b3066d4).
⚠️ Report is 5 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...pector/vector/transfers/TransfersLayerBuilder.java 0.00% 15 Missing ⚠️
...r/vector/transfers/PathTransferPropertyMapper.java 0.00% 7 Missing ⚠️
...ner/apis/vectortiles/DebugVectorTilesResource.java 16.66% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             dev-2.x    #7661    +/-   ##
===========================================
  Coverage      74.07%   74.08%            
- Complexity     21884    21903    +19     
===========================================
  Files           2426     2431     +5     
  Lines          85929    86035   +106     
  Branches        8563     8568     +5     
===========================================
+ Hits           63651    63735    +84     
- Misses         19246    19264    +18     
- Partials        3032     3036     +4     

☔ View full report in Codecov by Harness.
📢 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.

@VillePihlava VillePihlava left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very nice. Only thing that I could think of is that do we want to have the flex transfers on by default?

@VillePihlava

Copy link
Copy Markdown
Contributor

Also, thanks to this debug UI addition it looks like the weird flex routing results related to train stations are related to transfers. For example, in this picture a flex route that should arrive from the north is forced to either take a long detour to get to the south side of the station or use a short unnecessary public transit leg before arriving at the station:

image

@leonardehrenfried

Copy link
Copy Markdown
Member Author

The map can get quite busy if you have large areas, so I would not want to enable it by default. Flex debugging is after all a niche activity.

@VillePihlava

Copy link
Copy Markdown
Contributor

The map can get quite busy if you have large areas, so I would not want to enable it by default. Flex debugging is after all a niche activity.

It was on by default when I tested it. My question was badly worded, but I was asking whether we should turn it off :D

@leonardehrenfried

Copy link
Copy Markdown
Member Author

Oops - you're totally right. I will change it.

@leonardehrenfried

Copy link
Copy Markdown
Member Author

If this is no longer a construction site I would improve the tagging. Then you have an intersection vertex closer to the platform in question.

It may already be enough.

@VillePihlava

Copy link
Copy Markdown
Contributor

If this is no longer a construction site I would improve the tagging. Then you have an intersection vertex closer to the platform in question.

I believe the construction tag is still topical. I also noticed the same problem on another train station. I think it should be fixed in OTP somehow, but I can't think of a simple fix. I assume the transfers just link to the nearest driveable edge and changing that logic would require coming up with either a complex and thorough solution, or something else. The green line is roughly the "correct one", the blue line is the "wrong one":

image

VillePihlava
VillePihlava previously approved these changes May 29, 2026
Comment thread application/src/main/java/org/opentripplanner/apis/vectortiles/Colors.java Outdated
Comment thread application/src/main/java/org/opentripplanner/apis/vectortiles/Groups.java Outdated
@leonardehrenfried

Copy link
Copy Markdown
Member Author

Sorry, @t2gran and @VillePihlava I accitendally rebased on top of dev-2.x instead of merging. Sorry abou that.

@leonardehrenfried leonardehrenfried added this pull request to the merge queue Jun 22, 2026
Merged via the queue into opentripplanner:dev-2.x with commit c91572f Jun 22, 2026
8 checks passed
@leonardehrenfried leonardehrenfried deleted the flex-transfers-debug branch June 22, 2026 09:13
t2gran pushed a commit that referenced this pull request Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

+OTP Debug UI OTP bundled client, the OTP server is normally not changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants