From 80c5df168a20e7df872d23d5f5ea2629b9489dec Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 23 Sep 2022 15:22:38 +0200 Subject: [PATCH] refactor crossing presets to use (new) `crossing:markings` tag The tag proposal `crossing:markings` was recently accepted: https://wiki.openstreetmap.org/wiki/Key:crossing:markings Closes #589 Closes #507 Closes #568 See also #408 --- data/fields/crossing.json | 14 ++++- data/fields/crossing/markings.json | 5 ++ data/preset_categories/path.json | 2 +- data/preset_defaults.json | 3 +- .../crossing/{marked.json => _marked.json} | 4 +- data/presets/highway/crossing/_zebra.json | 1 + .../highway/crossing/traffic_signals.json | 2 +- .../{_uncontrolled.json => uncontrolled.json} | 5 +- data/presets/highway/crossing/unmarked.json | 1 - data/presets/highway/cycleway/_crossing.json | 5 +- .../highway/cycleway/crossing/_marked.json | 27 ++++++++ .../cycleway/crossing/bicycle_foot.json | 6 +- .../cycleway/crossing/traffic_signals.json | 34 +++++++++++ .../{marked.json => uncontrolled.json} | 11 ++-- .../highway/cycleway/crossing/unmarked.json | 5 +- data/presets/highway/footway/_crossing.json | 6 +- .../highway/footway/crossing/_marked.json | 29 +++++++++ .../footway/{ => crossing}/_zebra.json | 7 ++- .../{ => crossing}/traffic_signals.json | 6 +- .../uncontrolled.json} | 16 ++--- .../footway/{ => crossing}/unmarked.json | 5 +- data/presets/railway/crossing.json | 4 ++ interim/source_strings.yaml | 61 +++++++++++++------ 23 files changed, 200 insertions(+), 59 deletions(-) create mode 100644 data/fields/crossing/markings.json rename data/presets/highway/crossing/{marked.json => _marked.json} (85%) rename data/presets/highway/crossing/{_uncontrolled.json => uncontrolled.json} (82%) create mode 100644 data/presets/highway/cycleway/crossing/_marked.json create mode 100644 data/presets/highway/cycleway/crossing/traffic_signals.json rename data/presets/highway/cycleway/crossing/{marked.json => uncontrolled.json} (75%) create mode 100644 data/presets/highway/footway/crossing/_marked.json rename data/presets/highway/footway/{ => crossing}/_zebra.json (79%) rename data/presets/highway/footway/{ => crossing}/traffic_signals.json (91%) rename data/presets/highway/footway/{marked.json => crossing/uncontrolled.json} (67%) rename data/presets/highway/footway/{ => crossing}/unmarked.json (90%) diff --git a/data/fields/crossing.json b/data/fields/crossing.json index 03cd7efe..4ec18d99 100644 --- a/data/fields/crossing.json +++ b/data/fields/crossing.json @@ -1,5 +1,17 @@ { "key": "crossing", "type": "combo", - "label": "Type" + "label": "Type", + "options": [ + "traffic_signals", + "uncontrolled", + "unmarked" + ], + "strings": { + "options": { + "traffic_signals": "Crossing With Traffic Signals", + "uncontrolled": "Only Road Markings", + "unmarked": "No Road Markings or Traffic Lights" + } + } } diff --git a/data/fields/crossing/markings.json b/data/fields/crossing/markings.json new file mode 100644 index 00000000..5d6fe489 --- /dev/null +++ b/data/fields/crossing/markings.json @@ -0,0 +1,5 @@ +{ + "key": "crossing:markings", + "type": "combo", + "label": "Crossing Markings" +} diff --git a/data/preset_categories/path.json b/data/preset_categories/path.json index d48958cd..2d42c082 100644 --- a/data/preset_categories/path.json +++ b/data/preset_categories/path.json @@ -4,7 +4,7 @@ "members": [ "highway/path", "highway/footway", - "highway/footway/marked", + "highway/footway/crossing/uncontrolled", "highway/footway/sidewalk", "highway/steps", "highway/cycleway", diff --git a/data/preset_defaults.json b/data/preset_defaults.json index f83cfd50..286b5b15 100644 --- a/data/preset_defaults.json +++ b/data/preset_defaults.json @@ -36,7 +36,8 @@ "point" ], "vertex": [ - "highway/crossing/marked", + "highway/crossing/traffic_signals", + "highway/crossing/uncontrolled", "highway/crossing/unmarked", "railway/level_crossing", "highway/traffic_signals", diff --git a/data/presets/highway/crossing/marked.json b/data/presets/highway/crossing/_marked.json similarity index 85% rename from data/presets/highway/crossing/marked.json rename to data/presets/highway/crossing/_marked.json index 3c248b50..9ec22411 100644 --- a/data/presets/highway/crossing/marked.json +++ b/data/presets/highway/crossing/_marked.json @@ -4,6 +4,7 @@ "crossing", "tactile_paving", "crossing/island", + "crossing/markings", "crossing_raised" ], "moreFields": [ @@ -25,5 +26,6 @@ "marked crossing", "crosswalk" ], - "name": "Marked Crosswalk" + "name": "Marked Crosswalk", + "searchable": false } diff --git a/data/presets/highway/crossing/_zebra.json b/data/presets/highway/crossing/_zebra.json index 23b0d728..87de5a7e 100644 --- a/data/presets/highway/crossing/_zebra.json +++ b/data/presets/highway/crossing/_zebra.json @@ -4,6 +4,7 @@ "crossing", "tactile_paving", "crossing/island", + "crossing/markings", "crossing_raised" ], "geometry": [ diff --git a/data/presets/highway/crossing/traffic_signals.json b/data/presets/highway/crossing/traffic_signals.json index fb0db84f..24fde131 100644 --- a/data/presets/highway/crossing/traffic_signals.json +++ b/data/presets/highway/crossing/traffic_signals.json @@ -1,9 +1,9 @@ { "icon": "temaki-railway_signals", "fields": [ - "crossing", "tactile_paving", "crossing/island", + "crossing/markings", "crossing_raised", "button_operated", "traffic_signals/sound", diff --git a/data/presets/highway/crossing/_uncontrolled.json b/data/presets/highway/crossing/uncontrolled.json similarity index 82% rename from data/presets/highway/crossing/_uncontrolled.json rename to data/presets/highway/crossing/uncontrolled.json index de0914b3..5320b2d5 100644 --- a/data/presets/highway/crossing/_uncontrolled.json +++ b/data/presets/highway/crossing/uncontrolled.json @@ -1,9 +1,9 @@ { "icon": "temaki-pedestrian_crosswalk", "fields": [ - "crossing", "tactile_paving", "crossing/island", + "crossing/markings", "crossing_raised" ], "geometry": [ @@ -17,6 +17,5 @@ "key": "crossing", "value": "uncontrolled" }, - "name": "Marked Crosswalk", - "searchable": false + "name": "Marked Crosswalk" } diff --git a/data/presets/highway/crossing/unmarked.json b/data/presets/highway/crossing/unmarked.json index 0640f22f..118fc785 100644 --- a/data/presets/highway/crossing/unmarked.json +++ b/data/presets/highway/crossing/unmarked.json @@ -1,7 +1,6 @@ { "icon": "temaki-pedestrian", "fields": [ - "crossing", "tactile_paving", "crossing/island", "crossing_raised" diff --git a/data/presets/highway/cycleway/_crossing.json b/data/presets/highway/cycleway/_crossing.json index 3a8e6783..d2aab3cc 100644 --- a/data/presets/highway/cycleway/_crossing.json +++ b/data/presets/highway/cycleway/_crossing.json @@ -2,10 +2,11 @@ "icon": "temaki-cyclist_crosswalk", "fields": [ "crossing", - "access", "surface", "tactile_paving", - "crossing/island" + "crossing/island", + "crossing/markings", + "access" ], "geometry": [ "line" diff --git a/data/presets/highway/cycleway/crossing/_marked.json b/data/presets/highway/cycleway/crossing/_marked.json new file mode 100644 index 00000000..ba1ecf02 --- /dev/null +++ b/data/presets/highway/cycleway/crossing/_marked.json @@ -0,0 +1,27 @@ +{ + "icon": "temaki-cyclist_crosswalk", + "fields": [ + "crossing", + "surface", + "tactile_paving", + "crossing/island", + "crossing/markings", + "crossing_raised", + "access" + ], + "geometry": [ + "line" + ], + "tags": { + "highway": "cycleway", + "cycleway": "crossing", + "crossing": "marked" + }, + "reference": { + "key": "crossing", + "value": "marked" + }, + "matchScore": 0.95, + "name": "Marked Cycle Crossing", + "searchable": false +} diff --git a/data/presets/highway/cycleway/crossing/bicycle_foot.json b/data/presets/highway/cycleway/crossing/bicycle_foot.json index 5c1d3e1d..dcb3da15 100644 --- a/data/presets/highway/cycleway/crossing/bicycle_foot.json +++ b/data/presets/highway/cycleway/crossing/bicycle_foot.json @@ -9,11 +9,13 @@ "icon": "temaki-ped_cyclist_crosswalk", "fields": [ "crossing", - "access", "surface", "smoothness", "tactile_paving", - "crossing/island" + "crossing/island", + "crossing/markings", + "crossing_raised", + "access" ], "geometry": [ "line" diff --git a/data/presets/highway/cycleway/crossing/traffic_signals.json b/data/presets/highway/cycleway/crossing/traffic_signals.json new file mode 100644 index 00000000..fdf25df3 --- /dev/null +++ b/data/presets/highway/cycleway/crossing/traffic_signals.json @@ -0,0 +1,34 @@ +{ + "icon": "fas-biking", + "fields": [ + "crossing", + "surface", + "tactile_paving", + "crossing/island", + "crossing_raised", + "button_operated", + "traffic_signals/sound", + "traffic_signals/vibration", + "access" + ], + "geometry": [ + "line" + ], + "tags": { + "highway": "cycleway", + "cycleway": "crossing", + "crossing": "traffic_signals" + }, + "reference": { + "key": "crossing", + "value": "traffic_signals" + }, + "terms": [ + "cycle path crossing", + "cycleway crossing", + "bicycle crossing", + "bike crossing" + ], + "matchScore": 0.95, + "name": "Cycle Crossing With Traffic Signals" +} diff --git a/data/presets/highway/cycleway/crossing/marked.json b/data/presets/highway/cycleway/crossing/uncontrolled.json similarity index 75% rename from data/presets/highway/cycleway/crossing/marked.json rename to data/presets/highway/cycleway/crossing/uncontrolled.json index c469de35..2b0cc08c 100644 --- a/data/presets/highway/cycleway/crossing/marked.json +++ b/data/presets/highway/cycleway/crossing/uncontrolled.json @@ -1,11 +1,12 @@ { "icon": "temaki-cyclist_crosswalk", "fields": [ - "crossing", - "access", "surface", "tactile_paving", - "crossing/island" + "crossing/island", + "crossing/markings", + "crossing_raised", + "access" ], "geometry": [ "line" @@ -13,11 +14,11 @@ "tags": { "highway": "cycleway", "cycleway": "crossing", - "crossing": "marked" + "crossing": "uncontrolled" }, "reference": { "key": "crossing", - "value": "marked" + "value": "uncontrolled" }, "terms": [ "cycle crosswalk", diff --git a/data/presets/highway/cycleway/crossing/unmarked.json b/data/presets/highway/cycleway/crossing/unmarked.json index 11e69f6e..d3a3223c 100644 --- a/data/presets/highway/cycleway/crossing/unmarked.json +++ b/data/presets/highway/cycleway/crossing/unmarked.json @@ -2,10 +2,11 @@ "icon": "fas-biking", "fields": [ "crossing", - "access", "surface", "tactile_paving", - "crossing/island" + "crossing/island", + "crossing_raised", + "access" ], "geometry": [ "line" diff --git a/data/presets/highway/footway/_crossing.json b/data/presets/highway/footway/_crossing.json index 2b0a3f08..28447d56 100644 --- a/data/presets/highway/footway/_crossing.json +++ b/data/presets/highway/footway/_crossing.json @@ -1,10 +1,12 @@ { "fields": [ "crossing", - "access", "surface", "tactile_paving", - "crossing/island" + "crossing/island", + "crossing/markings", + "crossing_raised", + "access" ], "geometry": [ "line" diff --git a/data/presets/highway/footway/crossing/_marked.json b/data/presets/highway/footway/crossing/_marked.json new file mode 100644 index 00000000..78154a08 --- /dev/null +++ b/data/presets/highway/footway/crossing/_marked.json @@ -0,0 +1,29 @@ +{ + "icon": "temaki-pedestrian_crosswalk", + "fields": [ + "crossing", + "surface", + "tactile_paving", + "crossing/island", + "crossing/markings", + "crossing_raised", + "access" + ], + "moreFields": [ + "flashing_lights" + ], + "geometry": [ + "line" + ], + "tags": { + "highway": "footway", + "footway": "crossing", + "crossing": "marked" + }, + "reference": { + "key": "crossing", + "value": "marked" + }, + "name": "Marked Crossing", + "searchable": false +} diff --git a/data/presets/highway/footway/_zebra.json b/data/presets/highway/footway/crossing/_zebra.json similarity index 79% rename from data/presets/highway/footway/_zebra.json rename to data/presets/highway/footway/crossing/_zebra.json index 2ed5dfc5..ceeaab56 100644 --- a/data/presets/highway/footway/_zebra.json +++ b/data/presets/highway/footway/crossing/_zebra.json @@ -2,11 +2,12 @@ "icon": "temaki-pedestrian_crosswalk", "fields": [ "crossing", - "access", "surface", "tactile_paving", "crossing/island", - "crossing_raised" + "crossing/markings", + "crossing_raised", + "access" ], "geometry": [ "line" @@ -20,6 +21,6 @@ "key": "crossing", "value": "zebra" }, - "name": "Marked Crosswalk", + "name": "Marked Crossing", "searchable": false } diff --git a/data/presets/highway/footway/traffic_signals.json b/data/presets/highway/footway/crossing/traffic_signals.json similarity index 91% rename from data/presets/highway/footway/traffic_signals.json rename to data/presets/highway/footway/crossing/traffic_signals.json index 404108f3..8ede1f04 100644 --- a/data/presets/highway/footway/traffic_signals.json +++ b/data/presets/highway/footway/crossing/traffic_signals.json @@ -1,15 +1,15 @@ { "icon": "temaki-railway_signals", "fields": [ - "crossing", - "access", "surface", "tactile_paving", "crossing/island", + "crossing/markings", "crossing_raised", "button_operated", "traffic_signals/sound", - "traffic_signals/vibration" + "traffic_signals/vibration", + "access" ], "moreFields": [ "traffic_signals/arrow", diff --git a/data/presets/highway/footway/marked.json b/data/presets/highway/footway/crossing/uncontrolled.json similarity index 67% rename from data/presets/highway/footway/marked.json rename to data/presets/highway/footway/crossing/uncontrolled.json index 90fe6960..5d0c9d96 100644 --- a/data/presets/highway/footway/marked.json +++ b/data/presets/highway/footway/crossing/uncontrolled.json @@ -1,12 +1,12 @@ { - "icon": "temaki-pedestrian_crosswalk", + "icon": "temaki-pedestrian", "fields": [ - "crossing", - "access", "surface", "tactile_paving", "crossing/island", - "crossing_raised" + "crossing/markings", + "crossing_raised", + "access" ], "moreFields": [ "flashing_lights" @@ -17,18 +17,18 @@ "tags": { "highway": "footway", "footway": "crossing", - "crossing": "marked" + "crossing": "uncontrolled" }, "reference": { "key": "crossing", - "value": "marked" + "value": "uncontrolled" }, "terms": [ "marked foot path crossing", - "marked crossing", + "marked crosswalk", "marked pedestrian crosswalk", "zebra crossing", "crosswalk" ], - "name": "Marked Crosswalk" + "name": "Marked Crossing" } diff --git a/data/presets/highway/footway/unmarked.json b/data/presets/highway/footway/crossing/unmarked.json similarity index 90% rename from data/presets/highway/footway/unmarked.json rename to data/presets/highway/footway/crossing/unmarked.json index 99a5bb35..681be36d 100644 --- a/data/presets/highway/footway/unmarked.json +++ b/data/presets/highway/footway/crossing/unmarked.json @@ -1,12 +1,11 @@ { "icon": "temaki-pedestrian", "fields": [ - "crossing", - "access", "surface", "tactile_paving", "crossing/island", - "crossing_raised" + "crossing_raised", + "access" ], "moreFields": [ "flashing_lights" diff --git a/data/presets/railway/crossing.json b/data/presets/railway/crossing.json index 6edf2e41..a258dc61 100644 --- a/data/presets/railway/crossing.json +++ b/data/presets/railway/crossing.json @@ -1,10 +1,14 @@ { "icon": "temaki-pedestrian", "fields": [ + "crossing", "crossing/barrier", "crossing/bell", "crossing/light" ], + "moreFields": [ + "crossing/markings" + ], "geometry": [ "vertex" ], diff --git a/interim/source_strings.yaml b/interim/source_strings.yaml index 8fbcba17..fc6f5bd2 100644 --- a/interim/source_strings.yaml +++ b/interim/source_strings.yaml @@ -685,6 +685,13 @@ en: crossing: # crossing=* label: Type + options: + # crossing=traffic_signals + traffic_signals: Crossing With Traffic Signals + # crossing=uncontrolled + uncontrolled: Only Road Markings + # crossing=unmarked + unmarked: No Road Markings or Traffic Lights crossing/barrier: # crossing:barrier=* label: Barrier Arm @@ -708,6 +715,10 @@ en: crossing/light: # crossing:light=* label: Lights + crossing/markings: + # crossing:markings=* + label: Crossing Markings + terms: '[translate with synonyms or related terms for ''Crossing Markings'', separated by commas]' crossing_raised: # traffic_calming=* label: Raised @@ -6200,8 +6211,6 @@ en: highway/crossing/marked: # highway=crossing + crossing=marked | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). name: Marked Crosswalk - # 'terms: zebra crossing,marked crossing,crosswalk' - terms: highway/crossing/traffic_signals: # highway=crossing + crossing=traffic_signals | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). name: Crossing With Pedestrian Signals @@ -6210,6 +6219,7 @@ en: highway/crossing/uncontrolled: # highway=crossing + crossing=uncontrolled | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). name: Marked Crosswalk + terms: highway/crossing/unmarked: # highway=crossing + crossing=unmarked | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). name: Unmarked Crossing @@ -6239,6 +6249,14 @@ en: highway/cycleway/crossing/marked: # highway=cycleway + cycleway=crossing + crossing=marked | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). name: Marked Cycle Crossing + highway/cycleway/crossing/traffic_signals: + # highway=cycleway + cycleway=crossing + crossing=traffic_signals | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). + name: Cycle Crossing With Traffic Signals + # 'terms: cycle path crossing,cycleway crossing,bicycle crossing,bike crossing' + terms: + highway/cycleway/crossing/uncontrolled: + # highway=cycleway + cycleway=crossing + crossing=uncontrolled | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). + name: Marked Cycle Crossing # 'terms: cycle crosswalk,cycle path crossing,cycleway crossing,bicycle crossing,bike crossing' terms: highway/cycleway/crossing/unmarked: @@ -6293,32 +6311,35 @@ en: highway/footway/crossing: # highway=footway + footway=crossing | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). name: Pedestrian Crossing + highway/footway/crossing/marked: + # highway=footway + footway=crossing + crossing=marked | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). + name: Marked Crossing + highway/footway/crossing/traffic_signals: + # highway=footway + footway=crossing + crossing=traffic_signals | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). + name: Crossing With Pedestrian Signals + # 'terms: pedestrian traffic lights,pedestrian traffic signals,pedestrian crossing (lights),bicycle crossing (lights),crosswalk (lights)' + terms: + highway/footway/crossing/uncontrolled: + # highway=footway + footway=crossing + crossing=uncontrolled | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). + name: Marked Crossing + # 'terms: marked foot path crossing,marked crosswalk,marked pedestrian crosswalk,zebra crossing,crosswalk' + terms: + highway/footway/crossing/unmarked: + # highway=footway + footway=crossing + crossing=unmarked | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). + name: Unmarked Crossing + # 'terms: unmarked foot path crossing,unmarked crosswalk,unmarked pedestrian crossing' + terms: + highway/footway/crossing/zebra: + # highway=footway + footway=crossing + crossing=zebra | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). + name: Marked Crossing highway/footway/informal: # highway=footway + informal=yes | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). name: Informal Foot Path - highway/footway/marked: - # highway=footway + footway=crossing + crossing=marked | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). - name: Marked Crosswalk - # 'terms: marked foot path crossing,marked crossing,marked pedestrian crosswalk,zebra crossing,crosswalk' - terms: highway/footway/sidewalk: # footway=sidewalk | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). name: Sidewalk # 'terms: pavement,sidepath' terms: - highway/footway/traffic_signals: - # highway=footway + footway=crossing + crossing=traffic_signals | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). - name: Crossing With Pedestrian Signals - # 'terms: pedestrian traffic lights,pedestrian traffic signals,pedestrian crossing (lights),bicycle crossing (lights),crosswalk (lights)' - terms: - highway/footway/unmarked: - # highway=footway + footway=crossing + crossing=unmarked | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). - name: Unmarked Crossing - # 'terms: unmarked foot path crossing,unmarked crosswalk,unmarked pedestrian crossing' - terms: - highway/footway/zebra: - # highway=footway + footway=crossing + crossing=zebra | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). - name: Marked Crosswalk highway/give_way: # highway=give_way | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key). name: Yield Sign