Skip to content

Improve street routing within concave parts of area holes - #6486

Merged
vesameskanen merged 14 commits into
opentripplanner:dev-2.xfrom
HSLdevcom:keep-interior-rings
Feb 26, 2025
Merged

Improve street routing within concave parts of area holes#6486
vesameskanen merged 14 commits into
opentripplanner:dev-2.xfrom
HSLdevcom:keep-interior-rings

Conversation

@vesameskanen

@vesameskanen vesameskanen commented Feb 25, 2025

Copy link
Copy Markdown
Contributor

Summary

Street graph building has been pruning the graph built for open areas too aggressively. It left the edges needed for passing through areas, but routing from locations obscured by complex area hole geometries was not always successful.

This PR adds the required hole edges to the street graph so that area routing never fails. Another minor improvement is optimized addition of area visibility points.

Before:
broken

After:
fixed

It turns out that concave parts of areas may not have any connection
to visibilkity nodes of the graph. Edges of area holes muts be included in the graph.
@vesameskanen
vesameskanen requested a review from a team as a code owner February 25, 2025 09:19
@codecov

codecov Bot commented Feb 25, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 90.00000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 70.10%. Comparing base (a7c5aec) to head (131cd66).
Report is 42 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...ntripplanner/graph_builder/module/osm/OsmArea.java 72.72% 3 Missing ⚠️
.../graph_builder/module/osm/WalkableAreaBuilder.java 94.11% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #6486   +/-   ##
==========================================
  Coverage      70.10%   70.10%           
- Complexity     18269    18270    +1     
==========================================
  Files           2077     2077           
  Lines          77659    77654    -5     
  Branches        7828     7826    -2     
==========================================
+ Hits           54439    54441    +2     
+ Misses         20439    20437    -2     
+ Partials        2781     2776    -5     

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

@leonardehrenfried

leonardehrenfried commented Feb 25, 2025

Copy link
Copy Markdown
Member

Please pull these changes: leonardehrenfried@25f37a9

@leonardehrenfried

Copy link
Copy Markdown
Member

The test we wrote today is now available here: https://github.com/leonardehrenfried/OpenTripPlanner/tree/keep-interior-rings

@optionsome optionsome added this to the 2.7 (next release) milestone Feb 26, 2025
@optionsome optionsome added the !Improvement A functional improvement or micro feature label Feb 26, 2025
@vesameskanen
vesameskanen merged commit a99d5b5 into opentripplanner:dev-2.x Feb 26, 2025
@vesameskanen
vesameskanen deleted the keep-interior-rings branch February 26, 2025 10:36
t2gran pushed a commit that referenced this pull request Feb 26, 2025
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.

3 participants