From 7bffc3a2b3b9df143e5e5e4ecb7433a67cf183c2 Mon Sep 17 00:00:00 2001 From: gluap Date: Wed, 31 Jan 2024 14:02:35 +0100 Subject: [PATCH] do not make inaccessible ways cycleable (often used for tram tracks) --- api/obs/bin/openbikesensor_transform_osm.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/obs/bin/openbikesensor_transform_osm.py b/api/obs/bin/openbikesensor_transform_osm.py index a5a76bd..97b0fa6 100755 --- a/api/obs/bin/openbikesensor_transform_osm.py +++ b/api/obs/bin/openbikesensor_transform_osm.py @@ -163,6 +163,11 @@ class OSMHandler(osmium.SimpleHandler): if not highway or highway not in HIGHWAY_TYPES: return + access = tags.get("access", None) + bicycle = tags.get("bicycle", None) + if access == "no" and bicycle not in ["designated", "yes", "permissive", "destination"]: + return + zone = determine_zone(tags) directionality, oneway = determine_direction(tags, zone) name = tags.get("name")