Skip to content

Do not create zero length StreetEdges - #3716

Merged
hannesj merged 8 commits into
opentripplanner:dev-2.xfrom
entur:otp2_zero_length_edges
Nov 4, 2021
Merged

Do not create zero length StreetEdges#3716
hannesj merged 8 commits into
opentripplanner:dev-2.xfrom
entur:otp2_zero_length_edges

Conversation

@hannesj

@hannesj hannesj commented Nov 2, 2021

Copy link
Copy Markdown
Contributor

Summary

This PR adds a warning for when zero-length StreetEdges are generated. This is an error, and creates issues, like #3674. This also fixes the two places, where such edges were previously created. They are the platform linker, the bicycle parking linker.

Issue

Fixes #3674

Unit tests

No changes

Code style

Code style followed

Documentation

No changes

@hannesj
hannesj requested a review from a team November 2, 2021 23:10
@hannesj
hannesj changed the base branch from master to dev-2.x November 2, 2021 23:10
@hannesj
hannesj requested a review from a team as a code owner November 2, 2021 23:10
Comment thread src/main/java/org/opentripplanner/routing/graph/Graph.java
@leonardehrenfried

Copy link
Copy Markdown
Member

I've tested this with one of my data sets and indeed #3674 is fixed.

However, during graph build I see a few log messages like these:

14:28:05.977 WARN (StreetEdge.java:128) StreetEdge service road from <split_21357 lat,lng=48.946316182486534,8.95875551617214> to <split_19316 lat,lng=48.94631618248659,8.958755516172117> has length of 0. This is usually an error.
14:28:05.977 ERROR (StreetEdge.java:801) Edge 2 (26167805) split at vertex at 48.946316182486534,8.95875551617214  has length 0 mm. Setting to 1 mm.

Is this something to worry about? Should they be fixed by this PR, too?

@t2gran t2gran added this to the 2.1 milestone Nov 4, 2021
@t2gran t2gran added the !Bug Apply to issues describing a bug and PRs witch fixes it. label Nov 4, 2021
Comment thread src/main/java/org/opentripplanner/graph_builder/module/StreetLinkerModule.java Outdated
@hannesj
hannesj merged commit de3dfd7 into opentripplanner:dev-2.x Nov 4, 2021
@hannesj
hannesj deleted the otp2_zero_length_edges branch November 4, 2021 14:55
t2gran pushed a commit that referenced this pull request Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Bug Apply to issues describing a bug and PRs witch fixes it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bicycle safety factor is NaN in zero length edges with elevation data

3 participants