Skip to content

Do not apply walkable area processing to open platform geometries - #4225

Merged
vesameskanen merged 5 commits into
opentripplanner:dev-2.xfrom
HSLdevcom:keep-open-platforms
Jun 22, 2022
Merged

Do not apply walkable area processing to open platform geometries#4225
vesameskanen merged 5 commits into
opentripplanner:dev-2.xfrom
HSLdevcom:keep-open-platforms

Conversation

@vesameskanen

Copy link
Copy Markdown
Contributor

Summary

Do not assume that all platform tagged OSM ways define a closed area. Instead, add open ways to street graph as normal routable ways.

Issue

Platform tagged ways are examined before adding them to walkable area collection. If the first and last node reference differ, area processing will not be applied.

For example, Helsinki region data contains about 1000 platforms which are not explicitly tagged as areas. Only 200 of these are actually closed polygons. The rest 800 were treated as walkable areas and most likely got erased from the street graph.

  • Before: Main graph size: |V|=626049 |E|=1689245
  • After: Main graph size: |V|=626969 |E|=1692487

3242 edges more got added to the graph.

Fixes #4215

Unit tests

Portland test data related snapshots and one OSM graph size assertion were updated. This PR adds a considerable number of edges to the Portland graph:

  • Before: Main graph size: |V|=20080 |E|=37686
  • After: Main graph size: |V|=20135 |E|=37922

Documentation

Code changes include comments.

Area processing may remove the open geometry, leaving gaps to the graph
@vesameskanen
vesameskanen requested a review from a team as a code owner June 20, 2022 08:39
Comment thread src/main/java/org/opentripplanner/graph_builder/module/osm/OSMDatabase.java Outdated
hannesj
hannesj previously approved these changes Jun 20, 2022
…Database.java

Co-authored-by: Leonard Ehrenfried <mail@leonard.io>
@codecov-commenter

codecov-commenter commented Jun 20, 2022

Copy link
Copy Markdown

Codecov Report

Merging #4225 (8b489ce) into dev-2.x (dadc117) will decrease coverage by 0.00%.
The diff coverage is 57.14%.

@@              Coverage Diff              @@
##             dev-2.x    #4225      +/-   ##
=============================================
- Coverage      56.45%   56.44%   -0.01%     
- Complexity     10342    10347       +5     
=============================================
  Files           1385     1385              
  Lines          56791    56810      +19     
  Branches        6620     6626       +6     
=============================================
+ Hits           32061    32068       +7     
- Misses         22728    22738      +10     
- Partials        2002     2004       +2     
Impacted Files Coverage Δ
...rg/opentripplanner/openstreetmap/model/OSMWay.java 72.72% <0.00%> (-16.17%) ⬇️
...pplanner/graph_builder/module/osm/OSMDatabase.java 76.75% <100.00%> (-0.64%) ⬇️
...g/opentripplanner/api/parameter/QualifiedMode.java 65.78% <0.00%> (-2.64%) ⬇️
...lanner/routing/vehicle_parking/VehicleParking.java 82.03% <0.00%> (-0.79%) ⬇️
...pentripplanner/model/plan/ScheduledTransitLeg.java 62.99% <0.00%> (+0.78%) ⬆️
...pentripplanner/model/plan/FrequencyTransitLeg.java 18.18% <0.00%> (+18.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dadc117...8b489ce. Read the comment docs.

hannesj
hannesj previously approved these changes Jun 20, 2022
@t2gran t2gran added this to the 2.2 milestone Jun 20, 2022
@t2gran t2gran added the !Improvement A functional improvement or micro feature label Jun 20, 2022
Comment thread src/main/java/org/opentripplanner/graph_builder/module/osm/OSMDatabase.java Outdated
Comment thread src/main/java/org/opentripplanner/graph_builder/module/osm/OSMDatabase.java Outdated
@vesameskanen
vesameskanen dismissed stale reviews from hannesj and leonardehrenfried via 8b489ce June 21, 2022 06:53
@vesameskanen
vesameskanen merged commit 8365e04 into opentripplanner:dev-2.x Jun 22, 2022
@vesameskanen
vesameskanen deleted the keep-open-platforms branch June 22, 2022 06:08
t2gran pushed a commit that referenced this pull request Jun 22, 2022
mvanlaar pushed a commit to ColombiaTransit/OpenTripPlanner that referenced this pull request Jun 22, 2022
mvanlaar pushed a commit to ColombiaTransit/OpenTripPlanner that referenced this pull request Jun 22, 2022
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.

Missing platform sections in walking network

5 participants