From aa9315e6ebbef7a2c8d25467111697d19c65ac84 Mon Sep 17 00:00:00 2001 From: Holger Bruch Date: Sun, 28 Jul 2024 12:16:14 +0200 Subject: [PATCH] Allow CAR for highway=liviving_street with cycleways --- .../openstreetmap/tagmapping/GermanyMapper.java | 7 +++++++ .../tagmapping/GermanyMapperTest.java | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/main/java/org/opentripplanner/openstreetmap/tagmapping/GermanyMapper.java b/src/main/java/org/opentripplanner/openstreetmap/tagmapping/GermanyMapper.java index 908d9838f53..100259ee7e3 100644 --- a/src/main/java/org/opentripplanner/openstreetmap/tagmapping/GermanyMapper.java +++ b/src/main/java/org/opentripplanner/openstreetmap/tagmapping/GermanyMapper.java @@ -50,6 +50,13 @@ public void populateProperties(WayPropertySet props) { ); props.setProperties("highway=*;junction=roundabout", withModes(BICYCLE_AND_CAR)); + // Living streets with cycleways are usually accessible for all modes + // https://overpass-turbo.eu/s/1OPP + props.setProperties( + "highway=living_street;cycleway=*", + withModes(ALL).bicycleSafety(0.85) + ); + // Pedestrian zones in Germany are forbidden for bicycles by default props.setProperties("highway=pedestrian", withModes(PEDESTRIAN)); props.setProperties("highway=residential;maxspeed=30", withModes(ALL).bicycleSafety(0.9)); diff --git a/src/test/java/org/opentripplanner/openstreetmap/tagmapping/GermanyMapperTest.java b/src/test/java/org/opentripplanner/openstreetmap/tagmapping/GermanyMapperTest.java index 00b1049bdda..b0370165b89 100644 --- a/src/test/java/org/opentripplanner/openstreetmap/tagmapping/GermanyMapperTest.java +++ b/src/test/java/org/opentripplanner/openstreetmap/tagmapping/GermanyMapperTest.java @@ -60,6 +60,21 @@ void cyclewayOpposite() { assertEquals(0.9, wps.getDataForWay(way).bicycleSafety().forward(), epsilon); // walk safety should be default assertEquals(1, wps.getDataForWay(way).walkSafety().forward(), epsilon); + assertEquals(StreetTraversalPermission.ALL, wps.getDataForWay(way).getPermission()); + } + + @Test + void cyclewayOppositeLivingStreet() { + // Test that cyclewayOpposites can be accesses by all modes + // way24623452 (Annastraße Aachen) + var way = new OSMWithTags(); + way.addTag("cycleway", "opposite"); + way.addTag("highway", "living_street"); + way.addTag("lit", "yes"); + way.addTag("maxspeed", "30"); + way.addTag("oneway", "yes"); + assertEquals(0.85, wps.getDataForWay(way).bicycleSafety().forward(), epsilon); + assertEquals(StreetTraversalPermission.ALL, wps.getDataForWay(way).getPermission()); } @Test