Skip to content

Commit cc2ca6f

Browse files
committed
fix: avoid ways shared with pedestrians in order to restore original road bike behaviour
The first example with "asphalt cycleway vs asphalt roundabout" did not work as expected.
1 parent da39513 commit cc2ca6f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ors-engine/src/main/java/org/heigit/ors/routing/graphhopper/extensions/flagencoders/bike/RoadBikeFlagEncoder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public RoadBikeFlagEncoder(int speedBits, double speedFactor, int maxTurnCosts,
116116
setSurfaceSpeed("sand", PUSHING_SECTION_SPEED / 2);
117117
setSurfaceSpeed("wood", PUSHING_SECTION_SPEED / 2);
118118

119-
setHighwaySpeed("cycleway", 18);
119+
setHighwaySpeed(KEY_CYCLEWAY, 18);
120120
setHighwaySpeed("path", 8);
121121
setHighwaySpeed("footway", 6);
122122
setHighwaySpeed("pedestrian", 6);
@@ -173,6 +173,8 @@ void collect(ReaderWay way, double wayTypeSpeed, TreeMap<Double, Integer> weight
173173
} else if (trackType == null || trackType.startsWith("grade")) {
174174
weightToPrioMap.put(110d, AVOID_AT_ALL_COSTS.getValue());
175175
}
176+
} else if (way.hasTag("foot", intendedValues)) {
177+
weightToPrioMap.put(110d, AVOID_IF_POSSIBLE.getValue());
176178
}
177179
}
178180

0 commit comments

Comments
 (0)