From 124376470aab55a06636284f57cde80811ac6cd2 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Thu, 24 Jul 2025 23:43:27 +0200 Subject: [PATCH] Themes(zhv): Slight cleanup --- assets/themes/zhv/zhv.json | 71 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git a/assets/themes/zhv/zhv.json b/assets/themes/zhv/zhv.json index 440b68c20..634da2d1e 100644 --- a/assets/themes/zhv/zhv.json +++ b/assets/themes/zhv/zhv.json @@ -120,10 +120,10 @@ } ], "calculatedTags": [ - "_closest_osm_stop_id=closest(feat)('transit_stops')?.properties?.id", + "_closest_osm_stop_id=closest(feat)('all_transit_stops')?.properties?.id", "_closest_osm_stop_distance=distanceTo(feat)(feat.properties._closest_osm_stop_id)", - "_closest_osm_stop_name=closest(feat)('transit_stops')?.properties?.name", - "_closest_osm_stop_ifopt=closest(feat)('transit_stops')?.properties?.['ref:IFOPT']", + "_closest_osm_stop_name=closest(feat)('all_transit_stops')?.properties?.name", + "_closest_osm_stop_ifopt=closest(feat)('all_transit_stops')?.properties?.['ref:IFOPT']", "_has_closeby_feature=(feat.properties._closest_osm_stop_ifopt === feat.properties._ifopt) ? 'yes' : (feat.properties._closest_osm_stop_distance < 15 ? 'yes' : (feat.properties._closest_osm_stop_distance > 25 ? 'no' : 'maybe'))", "_ifopt=feat.properties.DHID", "_tags='public_transport=platform;ref:IFOPT='+feat.properties._ifopt+';name='+feat.properties.Name" @@ -132,10 +132,75 @@ { "builtin": "transit_stops", "override": { + "#": "We're getting all public_transport=platforms since when importing ZHV stops, we don't add the type-specific tags.", + "source": { + "osmTags": "public_transport=platform" + }, + "id": "all_transit_stops", "name": { "en": "Public transport stops in OSM" }, "tagRenderings+": [ + { + "id": "type", + "question": { + "en": "What kind of transit types is this stop used for?" + }, + "condition": "_geometry:type=Point", + "multiAnswer": true, + "mappings": [ + { + "if": "bus=yes", + "ifnot": { + "and": [ + "bus=", + "highway=" + ] + }, + "then": { + "en": "This stop is used for bus transit." + }, + "addExtraTags": [ + "highway=bus_stop" + ] + }, + { + "if": "train=yes", + "ifnot": "train=", + "then": { + "en": "This stop is used for train transit." + } + }, + { + "if": "light_rail=yes", + "ifnot": "light_rail=", + "then": { + "en": "This stop is used for light rail transit." + } + }, + { + "if": "subway=yes", + "ifnot": "subway=", + "then": { + "en": "This stop is used for subway transit." + } + }, + { + "if": "tram=yes", + "ifnot": "tram=", + "then": { + "en": "This stop is used for tram transit." + } + }, + { + "if": "ferry=yes", + "ifnot": "ferry=", + "then": { + "en": "This stop is used for ferry transit." + } + } + ] + }, { "id": "ifopt", "question": {