You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
maxspeed=0.5 on a way triggers exception when using bicycle profile #3070
Describe the bug
I found a spot where OSM contains ways tagged with maxspeed=0.5. This bad data triggers the following exception when using one of the bicycle profiles
java.lang.IllegalArgumentException: Speed was 0.5 but cannot be lower than 1.0
at com.graphhopper.routing.util.parsers.AbstractAverageSpeedParser.setSpeed(AbstractAverageSpeedParser.java:42)
at com.graphhopper.routing.util.parsers.BikeCommonAverageSpeedParser.handleWayTags(BikeCommonAverageSpeedParser.java:176)
at com.graphhopper.routing.util.parsers.AbstractAverageSpeedParser.handleWayTags(AbstractAverageSpeedParser.java:54)
at com.graphhopper.routing.util.OSMParsers.handleWayTags(OSMParsers.java:101)
at com.graphhopper.routing.util.parsers.AbstractBikeTagParserTester.getSpeedFromFlags(AbstractBikeTagParserTester.java:103)
at com.graphhopper.routing.util.parsers.BikeTagParserTest.testSmoothness(BikeTagParserTest.java:366)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
To Reproduce
Tag a way with tag maxspeed=0.5 and use a bicycle profile
Activity
ratrun commentedon Oct 17, 2024
I'm not sure if this change is the way to go:
Draft PR for issue graphhopper#3070