From f496b853ddf7b7615df9ea6235ea6154b2e19214 Mon Sep 17 00:00:00 2001 From: Famlam Date: Sun, 25 Jun 2023 23:10:27 +0200 Subject: [PATCH] Update whitelist to match with JOSM See #1920 --- plugins/TagFix_MultipleTag2.py | 4 ++-- plugins/TagFix_MultipleTag2.validator.mapcss | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/TagFix_MultipleTag2.py b/plugins/TagFix_MultipleTag2.py index 4d04176ab..2f5cf272e 100644 --- a/plugins/TagFix_MultipleTag2.py +++ b/plugins/TagFix_MultipleTag2.py @@ -255,12 +255,12 @@ def way(self, data, tags, nds): # assertNoMatch:"way junction=yes" err.append({'class': 20800, 'subclass': 0, 'text': mapcss.tr('Tag highway missing on junction')}) - # way[oneway][!highway][!railway][!aerialway][!waterway][!aeroway][!piste:type] + # way[oneway][!highway][!railway][!aerialway][!waterway][!aeroway][!piste:type][!area:highway][attraction!=summer_toboggan][leisure!=track] if ('oneway' in keys): match = False if not match: capture_tags = {} - try: match = ((mapcss._tag_capture(capture_tags, 0, tags, 'oneway')) and (not mapcss._tag_capture(capture_tags, 1, tags, 'highway')) and (not mapcss._tag_capture(capture_tags, 2, tags, 'railway')) and (not mapcss._tag_capture(capture_tags, 3, tags, 'aerialway')) and (not mapcss._tag_capture(capture_tags, 4, tags, 'waterway')) and (not mapcss._tag_capture(capture_tags, 5, tags, 'aeroway')) and (not mapcss._tag_capture(capture_tags, 6, tags, 'piste:type'))) + try: match = ((mapcss._tag_capture(capture_tags, 0, tags, 'oneway')) and (not mapcss._tag_capture(capture_tags, 1, tags, 'highway')) and (not mapcss._tag_capture(capture_tags, 2, tags, 'railway')) and (not mapcss._tag_capture(capture_tags, 3, tags, 'aerialway')) and (not mapcss._tag_capture(capture_tags, 4, tags, 'waterway')) and (not mapcss._tag_capture(capture_tags, 5, tags, 'aeroway')) and (not mapcss._tag_capture(capture_tags, 6, tags, 'piste:type')) and (not mapcss._tag_capture(capture_tags, 7, tags, 'area:highway')) and (mapcss._tag_capture(capture_tags, 8, tags, 'attraction') != mapcss._value_const_capture(capture_tags, 8, 'summer_toboggan', 'summer_toboggan')) and (mapcss._tag_capture(capture_tags, 9, tags, 'leisure') != mapcss._value_const_capture(capture_tags, 9, 'track', 'track'))) except mapcss.RuleAbort: pass if match: # -osmoseTags:list("tag","highway","fix:chair") diff --git a/plugins/TagFix_MultipleTag2.validator.mapcss b/plugins/TagFix_MultipleTag2.validator.mapcss index 594e44669..e55155c48 100644 --- a/plugins/TagFix_MultipleTag2.validator.mapcss +++ b/plugins/TagFix_MultipleTag2.validator.mapcss @@ -100,7 +100,8 @@ way[junction][junction!=yes][!highway][!area:highway] { } -way[oneway][!highway][!railway][!aerialway][!waterway][!aeroway][!piste:type] { +way[oneway][!highway][!railway][!aerialway][!waterway][!aeroway][!piste:type][!area:highway][attraction!=summer_toboggan][leisure!=track] { + /* Largely overlapping with a JOSM rule */ throwWarning: tr("Tag highway missing on oneway"); assertMatch: "way oneway=yes building=yes"; assertNoMatch: "way highway=x cycleway=opposite oneway=yes";