diff --git a/mapcss/item_map.py b/mapcss/item_map.py index cde26bb50..037470211 100644 --- a/mapcss/item_map.py +++ b/mapcss/item_map.py @@ -1,6 +1,7 @@ #-*- coding: utf-8 -*- item_map = \ -{'FranceSpecificRules': {'class': {'a': 1}, +{'FranceSpecificRules': {'class': {"Cette station vend-elle toujours du SP95, ou a-t'il été remplacé par le SP95-E10 ?": 2, + 'a': 1}, 'item': 9999, 'prefix': 'Josm_', 'tags': []}, @@ -207,6 +208,7 @@ 'missing tag': 9004009, 'wrong crossing tag on a way': 9004002, 'wrong highway tag on a node': 9004008, + '{0} on a node': 9004010, '{0} used with {1}': 9004005}, 'item': 9004, 'prefix': 'Josm_', @@ -223,7 +225,8 @@ 'item': 9005, 'prefix': 'Josm_', 'tags': ['tag', 'value']}, - 'numeric': {'class': {'Unnecessary amount of decimal places': 9006021, + 'numeric': {'class': {'Airport tagging': 9006022, + 'Unnecessary amount of decimal places': 9006021, 'numerical key': 9006001, 'unusual value of {0}': 9006010, 'unusual value of {0}: kilometers is default; point is decimal separator; if units, put space then unit': 9006020, diff --git a/plugins/Josm_FranceSpecificRules.py b/plugins/Josm_FranceSpecificRules.py index 90f0d9fcf..27a131587 100644 --- a/plugins/Josm_FranceSpecificRules.py +++ b/plugins/Josm_FranceSpecificRules.py @@ -11,6 +11,7 @@ class Josm_FranceSpecificRules(Plugin): def init(self, logger): Plugin.init(self, logger) tags = capture_tags = {} + self.errors[2] = {'item': 9999, 'level': 3, 'tag': [], 'desc': mapcss.tr(u'Cette station vend-elle toujours du SP95, ou a-t\'il été remplacé par le SP95-E10 ?')} self.errors[20806] = {'item': 2080, 'level': 3, 'tag': mapcss.list_(u'parking', u'amenity', u'fix:chair'), 'desc': mapcss.tr(u'Missing tag carpool on area')} self.errors[21600] = {'item': 2160, 'level': 3, 'tag': mapcss.list_(u'tag', u'railway'), 'desc': mapcss.tr(u'Missing tag gauge on rail')} @@ -43,6 +44,18 @@ def node(self, data, tags): [u'carpool',u'designated']]) }}) + # *[amenity=fuel][fuel:octane_95=yes][!fuel:e10][inside("FR")] + if (u'amenity' in keys and u'fuel:octane_95' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'fuel') and mapcss._tag_capture(capture_tags, 1, tags, u'fuel:octane_95') == mapcss._value_capture(capture_tags, 1, u'yes') and not mapcss._tag_capture(capture_tags, 2, tags, u'fuel:e10') and mapcss.inside(self.father.config.options, u'FR')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("Cette station vend-elle toujours du SP95, ou a-t'il été remplacé par le SP95-E10 ?") + # suggestAlternative:"fuel:e10=yes/no" + err.append({'class': 2, 'subclass': 662274675, 'text': mapcss.tr(u'Cette station vend-elle toujours du SP95, ou a-t\'il été remplacé par le SP95-E10 ?')}) + return err def way(self, data, tags, nds): @@ -90,6 +103,18 @@ def way(self, data, tags, nds): [u'carpool',u'designated']]) }}) + # *[amenity=fuel][fuel:octane_95=yes][!fuel:e10][inside("FR")] + if (u'amenity' in keys and u'fuel:octane_95' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'fuel') and mapcss._tag_capture(capture_tags, 1, tags, u'fuel:octane_95') == mapcss._value_capture(capture_tags, 1, u'yes') and not mapcss._tag_capture(capture_tags, 2, tags, u'fuel:e10') and mapcss.inside(self.father.config.options, u'FR')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("Cette station vend-elle toujours du SP95, ou a-t'il été remplacé par le SP95-E10 ?") + # suggestAlternative:"fuel:e10=yes/no" + err.append({'class': 2, 'subclass': 662274675, 'text': mapcss.tr(u'Cette station vend-elle toujours du SP95, ou a-t\'il été remplacé par le SP95-E10 ?')}) + return err def relation(self, data, tags, members): @@ -117,6 +142,18 @@ def relation(self, data, tags, members): [u'carpool',u'designated']]) }}) + # *[amenity=fuel][fuel:octane_95=yes][!fuel:e10][inside("FR")] + if (u'amenity' in keys and u'fuel:octane_95' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'fuel') and mapcss._tag_capture(capture_tags, 1, tags, u'fuel:octane_95') == mapcss._value_capture(capture_tags, 1, u'yes') and not mapcss._tag_capture(capture_tags, 2, tags, u'fuel:e10') and mapcss.inside(self.father.config.options, u'FR')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("Cette station vend-elle toujours du SP95, ou a-t'il été remplacé par le SP95-E10 ?") + # suggestAlternative:"fuel:e10=yes/no" + err.append({'class': 2, 'subclass': 662274675, 'text': mapcss.tr(u'Cette station vend-elle toujours du SP95, ou a-t\'il été remplacé par le SP95-E10 ?')}) + return err diff --git a/plugins/Josm_Rules_Brazilian_Specific.py b/plugins/Josm_Rules_Brazilian_Specific.py index 40f8c4870..4dbe6ef45 100644 --- a/plugins/Josm_Rules_Brazilian_Specific.py +++ b/plugins/Josm_Rules_Brazilian_Specific.py @@ -13,7 +13,6 @@ class Josm_Rules_Brazilian_Specific(Plugin): def init(self, logger): Plugin.init(self, logger) tags = capture_tags = {} - self.errors[9018001] = {'item': 9018, 'level': 3, 'tag': ["tag"], 'desc': mapcss.tr(u'{0} com logradouro ausente, errado ou abreviado', mapcss._tag_uncapture(capture_tags, u'{0.key}'))} self.errors[9018002] = {'item': 9018, 'level': 3, 'tag': ["tag"], 'desc': mapcss.tr(u'Brasil - Verificar')} self.errors[9018003] = {'item': 9018, 'level': 3, 'tag': ["tag"], 'desc': mapcss.tr(u'palavra abreviada em {0}', mapcss._tag_uncapture(capture_tags, u'{0.key}'))} self.errors[9018004] = {'item': 9018, 'level': 3, 'tag': ["tag"], 'desc': mapcss.tr(u'nome supérfluo/incompleto de local de lazer')} @@ -50,7 +49,6 @@ def init(self, logger): self.errors[9018042] = {'item': 9018, 'level': 3, 'tag': ["tag"], 'desc': mapcss.tr(u'objeto incompleto: possui apenas {0} e {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'))} self.errors[9018043] = {'item': 9018, 'level': 3, 'tag': ["tag"], 'desc': mapcss.tr(u'não utilizar \'\'{0}\'\' para locais sem número', mapcss.tag(tags, u'addr:housenumber'))} self.errors[9018044] = {'item': 9018, 'level': 2, 'tag': ["tag"], 'desc': mapcss.tr(u'objeto contém Google como source')} - self.errors[9018045] = {'item': 9018, 'level': 3, 'tag': ["tag"], 'desc': mapcss.tr(u'rodovia com ref no nome')} self.errors[9018046] = {'item': 9018, 'level': 3, 'tag': ["tag"], 'desc': mapcss.tr(u'relação não deve possuir {0}', mapcss._tag_uncapture(capture_tags, u'{1.key}'))} self.errors[9018047] = {'item': 9018, 'level': 3, 'tag': ["tag"], 'desc': mapcss.tr(u'{0} deve ser utilizado apenas em nós', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))} self.errors[9018048] = {'item': 9018, 'level': 3, 'tag': ["tag"], 'desc': mapcss.tr(u'{0} deve possuir \'\'type=boundary\'\'', mapcss._tag_uncapture(capture_tags, u'{0.key}'))} @@ -142,6 +140,7 @@ def init(self, logger): self.re_7633bf4e = re.compile(r'Rodovia ([A-Z]{2,3}-[0-9]{2,4})') self.re_793b22ec = re.compile(r'^(?i)(?u)c((â|a)me|ama)ra\b') self.re_7a246e93 = re.compile(r'^(100|18{0,1}|19[0-9])$') + self.re_7a5b2736 = re.compile(r'\.') self.re_7afc6883 = re.compile(r'^[A-Z]{4}$') self.re_7b7c453d = re.compile(r'^(?i)(?u)(AM(A|E)|(Posto|Unidade (Básica)?) de Sa(u|ú)de|UBS|PSF).*') self.re_7ec1fb9a = re.compile(r'(?i)^prefeitura\b') @@ -162,8 +161,9 @@ def node(self, data, tags): try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'addr:street') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_6bf570a0, u'^(Aeroporto|Alameda|Área|Avenida|([1-9][0-9]?º )?Beco|Boulevard|Calçadão|Caminho|Campo|Chácara|Colônia|Condomínio|Conjunto|Contorno|Distrito|Elevado|Esplanada|Estação|Estrada|Favela|Fazenda|Feira|Jardim|Ladeira|Lago|Lagoa|Largo|Loteamento|Marginal|Morro|Núcleo|([1-9][0-9]?ª )?Paralela|Parque|Passagem|Passarela|Pátio|Ponte|Praça|Quadra|Recanto|Residencial|Rodovia|Rotatória|Rua|Servidão|Setor|Sítio|([1-9][0-9]?ª )?Subida|([1-9][0-9]?ª )?Travessa|Trecho|Trevo|Túnel|Vale|Vereda|Via|Viadutos?|Viela|Vila|(Anel|Complexo|Dispositivo) (Rodo)?(V|v)iário) .*'), mapcss._tag_capture(capture_tags, 1, tags, u'addr:street')) and mapcss.inside(self.father.config.options, u'BR')) except mapcss.RuleAbort: pass if match: + # group:tr("Brasil - Verificar") # throwWarning:tr("{0} com logradouro ausente, errado ou abreviado","{0.key}") - err.append({'class': 9018001, 'subclass': 279840772, 'text': mapcss.tr(u'{0} com logradouro ausente, errado ou abreviado', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + err.append({'class': 9018002, 'subclass': 279840772, 'text': mapcss.tr(u'{0} com logradouro ausente, errado ou abreviado', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) # *[!highway][route!=road][!public_transport][type!~/route|street/][name][name=~/^(?i)(?u)(alameda|avenida|beco|estrada|ladeira|passarela|rodovia|rotatória|rua|travessa|trevo|viela|(anel|complexo|dispositivo) viário) .*/][name!~/^(?i)estrada de ferro/][inside("BR")] if (u'name' in keys): @@ -858,6 +858,22 @@ def node(self, data, tags): # throwWarning:tr("não se deve utilizar {0} para demarcar áreas de cobertura de imagem","{0.key}") err.append({'class': 9018023, 'subclass': 895278192, 'text': mapcss.tr(u'não se deve utilizar {0} para demarcar áreas de cobertura de imagem', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # node[man_made=tower]["tower:type"=lighting][inside("BR")] + if (u'man_made' in keys and u'tower:type' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'tower') and mapcss._tag_capture(capture_tags, 1, tags, u'tower:type') == mapcss._value_capture(capture_tags, 1, u'lighting') and mapcss.inside(self.father.config.options, u'BR')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("uso incorreto de {0}","{0.tag}") + # suggestAlternative:"man_made=mast" + # fixAdd:"man_made=mast" + err.append({'class': 9018064, 'subclass': 865785, 'text': mapcss.tr(u'uso incorreto de {0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'man_made',u'mast']]) + }}) + # *[tourism=motel][amenity!=love_hotel][inside("BR")] # *[name=~/(?i)\bmotel\b/][amenity!=love_hotel][inside("BR")] if (u'name' in keys) or (u'tourism' in keys): @@ -1634,8 +1650,9 @@ def way(self, data, tags, nds): try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_568a42f4), mapcss._tag_capture(capture_tags, 1, tags, u'name')) and mapcss.inside(self.father.config.options, u'BR')) except mapcss.RuleAbort: pass if match: + # group:tr("Brasil - Verificar") # throwWarning:tr("rodovia com ref no nome") - err.append({'class': 9018045, 'subclass': 457207682, 'text': mapcss.tr(u'rodovia com ref no nome')}) + err.append({'class': 9018002, 'subclass': 457207682, 'text': mapcss.tr(u'rodovia com ref no nome')}) # way[highway=cycleway][name][name!~/^(?i)ciclovia .*/][inside("BR")] # way[highway][highway!~/bridleway|bus_stop|cycleway|crossing|footway|give_way|motorway_junction|path|raceway|rest_area|services|speed_camera|steps|stop/][name][name!~/^(Aeroporto|Alameda|Área|Avenida|([1-9][0-9]?º )?Beco|Boulevard|Calçadão|Caminho|Campo|Chácara|Colônia|Condomínio|Conjunto|Contorno|Distrito|Elevado|Esplanada|Estação|Estrada|Favela|Fazenda|Feira|Jardim|Ladeira|Lago|Lagoa|Largo|Loteamento|Marginal|Morro|Núcleo|([1-9][0-9]?ª )?Paralela|Parque|Passagem|Passarela|Pátio|Ponte|Praça|Quadra|Recanto|Residencial|Rodoanel|Rodovia|Rotatória|Rótula|Rua|Servidão|Setor|Sítio|([1-9][0-9]?ª )?Subida|([1-9][0-9]?ª )?Travessa|Trecho|Trevo|Túnel|Vale|Vereda|Via|Viadutos?|Viela|Vila|(Anel|Complexo|Dispositivo) (Rodo)?(V|v)iário) .*/][inside("BR")] @@ -1650,8 +1667,9 @@ def way(self, data, tags, nds): try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_1054eb5a, u'bridleway|bus_stop|cycleway|crossing|footway|give_way|motorway_junction|path|raceway|rest_area|services|speed_camera|steps|stop'), mapcss._tag_capture(capture_tags, 1, tags, u'highway')) and mapcss._tag_capture(capture_tags, 2, tags, u'name') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 3, self.re_60ad6838, u'^(Aeroporto|Alameda|Área|Avenida|([1-9][0-9]?º )?Beco|Boulevard|Calçadão|Caminho|Campo|Chácara|Colônia|Condomínio|Conjunto|Contorno|Distrito|Elevado|Esplanada|Estação|Estrada|Favela|Fazenda|Feira|Jardim|Ladeira|Lago|Lagoa|Largo|Loteamento|Marginal|Morro|Núcleo|([1-9][0-9]?ª )?Paralela|Parque|Passagem|Passarela|Pátio|Ponte|Praça|Quadra|Recanto|Residencial|Rodoanel|Rodovia|Rotatória|Rótula|Rua|Servidão|Setor|Sítio|([1-9][0-9]?ª )?Subida|([1-9][0-9]?ª )?Travessa|Trecho|Trevo|Túnel|Vale|Vereda|Via|Viadutos?|Viela|Vila|(Anel|Complexo|Dispositivo) (Rodo)?(V|v)iário) .*'), mapcss._tag_capture(capture_tags, 3, tags, u'name')) and mapcss.inside(self.father.config.options, u'BR')) except mapcss.RuleAbort: pass if match: + # group:tr("Brasil - Verificar") # throwWarning:tr("{0} com logradouro ausente, errado ou abreviado","{0.key}") - err.append({'class': 9018001, 'subclass': 20071126, 'text': mapcss.tr(u'{0} com logradouro ausente, errado ou abreviado', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + err.append({'class': 9018002, 'subclass': 20071126, 'text': mapcss.tr(u'{0} com logradouro ausente, errado ou abreviado', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) # *["addr:street"]["addr:street"!~/^(Aeroporto|Alameda|Área|Avenida|([1-9][0-9]?º )?Beco|Boulevard|Calçadão|Caminho|Campo|Chácara|Colônia|Condomínio|Conjunto|Contorno|Distrito|Elevado|Esplanada|Estação|Estrada|Favela|Fazenda|Feira|Jardim|Ladeira|Lago|Lagoa|Largo|Loteamento|Marginal|Morro|Núcleo|([1-9][0-9]?ª )?Paralela|Parque|Passagem|Passarela|Pátio|Ponte|Praça|Quadra|Recanto|Residencial|Rodovia|Rotatória|Rua|Servidão|Setor|Sítio|([1-9][0-9]?ª )?Subida|([1-9][0-9]?ª )?Travessa|Trecho|Trevo|Túnel|Vale|Vereda|Via|Viadutos?|Viela|Vila|(Anel|Complexo|Dispositivo) (Rodo)?(V|v)iário) .*/][inside("BR")] if (u'addr:street' in keys): @@ -1661,8 +1679,21 @@ def way(self, data, tags, nds): try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'addr:street') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_6bf570a0, u'^(Aeroporto|Alameda|Área|Avenida|([1-9][0-9]?º )?Beco|Boulevard|Calçadão|Caminho|Campo|Chácara|Colônia|Condomínio|Conjunto|Contorno|Distrito|Elevado|Esplanada|Estação|Estrada|Favela|Fazenda|Feira|Jardim|Ladeira|Lago|Lagoa|Largo|Loteamento|Marginal|Morro|Núcleo|([1-9][0-9]?ª )?Paralela|Parque|Passagem|Passarela|Pátio|Ponte|Praça|Quadra|Recanto|Residencial|Rodovia|Rotatória|Rua|Servidão|Setor|Sítio|([1-9][0-9]?ª )?Subida|([1-9][0-9]?ª )?Travessa|Trecho|Trevo|Túnel|Vale|Vereda|Via|Viadutos?|Viela|Vila|(Anel|Complexo|Dispositivo) (Rodo)?(V|v)iário) .*'), mapcss._tag_capture(capture_tags, 1, tags, u'addr:street')) and mapcss.inside(self.father.config.options, u'BR')) except mapcss.RuleAbort: pass if match: + # group:tr("Brasil - Verificar") # throwWarning:tr("{0} com logradouro ausente, errado ou abreviado","{0.key}") - err.append({'class': 9018001, 'subclass': 279840772, 'text': mapcss.tr(u'{0} com logradouro ausente, errado ou abreviado', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + err.append({'class': 9018002, 'subclass': 279840772, 'text': mapcss.tr(u'{0} com logradouro ausente, errado ou abreviado', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # way[highway][name][name=~/\./] + if (u'highway' in keys and u'name' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') and mapcss._tag_capture(capture_tags, 1, tags, u'name') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 2, self.re_7a5b2736), mapcss._tag_capture(capture_tags, 2, tags, u'name'))) + except mapcss.RuleAbort: pass + if match: + # group:tr("Brasil - Verificar") + # throwWarning:tr("Rua com nome abreviado; procurar nome completo nas camadas de nomes") + err.append({'class': 9018002, 'subclass': 2131010585, 'text': mapcss.tr(u'Rua com nome abreviado; procurar nome completo nas camadas de nomes')}) # *[!highway][route!=road][!public_transport][type!~/route|street/][name][name=~/^(?i)(?u)(alameda|avenida|beco|estrada|ladeira|passarela|rodovia|rotatória|rua|travessa|trevo|viela|(anel|complexo|dispositivo) viário) .*/][name!~/^(?i)estrada de ferro/][inside("BR")] if (u'name' in keys): @@ -3135,8 +3166,9 @@ def relation(self, data, tags, members): try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_073e5345), mapcss._tag_capture(capture_tags, 1, tags, u'name')) and mapcss.inside(self.father.config.options, u'BR')) except mapcss.RuleAbort: pass if match: + # group:tr("Brasil - Verificar") # throwWarning:tr("rodovia com ref no nome") - err.append({'class': 9018045, 'subclass': 1625358529, 'text': mapcss.tr(u'rodovia com ref no nome')}) + err.append({'class': 9018002, 'subclass': 1625358529, 'text': mapcss.tr(u'rodovia com ref no nome')}) # *["addr:street"]["addr:street"!~/^(Aeroporto|Alameda|Área|Avenida|([1-9][0-9]?º )?Beco|Boulevard|Calçadão|Caminho|Campo|Chácara|Colônia|Condomínio|Conjunto|Contorno|Distrito|Elevado|Esplanada|Estação|Estrada|Favela|Fazenda|Feira|Jardim|Ladeira|Lago|Lagoa|Largo|Loteamento|Marginal|Morro|Núcleo|([1-9][0-9]?ª )?Paralela|Parque|Passagem|Passarela|Pátio|Ponte|Praça|Quadra|Recanto|Residencial|Rodovia|Rotatória|Rua|Servidão|Setor|Sítio|([1-9][0-9]?ª )?Subida|([1-9][0-9]?ª )?Travessa|Trecho|Trevo|Túnel|Vale|Vereda|Via|Viadutos?|Viela|Vila|(Anel|Complexo|Dispositivo) (Rodo)?(V|v)iário) .*/][inside("BR")] if (u'addr:street' in keys): @@ -3146,8 +3178,9 @@ def relation(self, data, tags, members): try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'addr:street') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_6bf570a0, u'^(Aeroporto|Alameda|Área|Avenida|([1-9][0-9]?º )?Beco|Boulevard|Calçadão|Caminho|Campo|Chácara|Colônia|Condomínio|Conjunto|Contorno|Distrito|Elevado|Esplanada|Estação|Estrada|Favela|Fazenda|Feira|Jardim|Ladeira|Lago|Lagoa|Largo|Loteamento|Marginal|Morro|Núcleo|([1-9][0-9]?ª )?Paralela|Parque|Passagem|Passarela|Pátio|Ponte|Praça|Quadra|Recanto|Residencial|Rodovia|Rotatória|Rua|Servidão|Setor|Sítio|([1-9][0-9]?ª )?Subida|([1-9][0-9]?ª )?Travessa|Trecho|Trevo|Túnel|Vale|Vereda|Via|Viadutos?|Viela|Vila|(Anel|Complexo|Dispositivo) (Rodo)?(V|v)iário) .*'), mapcss._tag_capture(capture_tags, 1, tags, u'addr:street')) and mapcss.inside(self.father.config.options, u'BR')) except mapcss.RuleAbort: pass if match: + # group:tr("Brasil - Verificar") # throwWarning:tr("{0} com logradouro ausente, errado ou abreviado","{0.key}") - err.append({'class': 9018001, 'subclass': 279840772, 'text': mapcss.tr(u'{0} com logradouro ausente, errado ou abreviado', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + err.append({'class': 9018002, 'subclass': 279840772, 'text': mapcss.tr(u'{0} com logradouro ausente, errado ou abreviado', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) # *[!highway][route!=road][!public_transport][type!~/route|street/][name][name=~/^(?i)(?u)(alameda|avenida|beco|estrada|ladeira|passarela|rodovia|rotatória|rua|travessa|trevo|viela|(anel|complexo|dispositivo) viário) .*/][name!~/^(?i)estrada de ferro/][inside("BR")] if (u'name' in keys): diff --git a/plugins/Josm_combinations.py b/plugins/Josm_combinations.py index 3e683ddf5..6a5f5d072 100644 --- a/plugins/Josm_combinations.py +++ b/plugins/Josm_combinations.py @@ -47,12 +47,13 @@ def node(self, data, tags): capture_tags = {} keys = tags.keys() err = [] - set_AllSameMaxspeed = False + set_AllSameMaxspeed = set_unpaved_surface = False # node[ntd_id][!highway] # *[border_type][!boundary] # *[piste:difficulty][!piste:type] # *[place][!name][place!=islet] + # *[transformer][!power] # *[source:date][!source] # *[source:name][!name] # *[source:maxspeed:forward][!maxspeed:forward][!maxspeed] @@ -80,7 +81,7 @@ def node(self, data, tags): # *[source:addr:housenumber][!addr:housenumber] # *[source:addr][!/^addr:/] # *[source:maxspeed][!/^maxspeed:?/] - if (u'border_type' in keys) or (u'ntd_id' in keys) or (u'piste:difficulty' in keys) or (u'place' in keys) or (u'source:addr' in keys) or (u'source:addr:housenumber' in keys) or (u'source:addr:postcode' in keys) or (u'source:bicycle' in keys) or (u'source:bridge' in keys) or (u'source:building' in keys) or (u'source:date' in keys) or (u'source:designation' in keys) or (u'source:ele' in keys) or (u'source:height' in keys) or (u'source:hgv' in keys) or (u'source:highway' in keys) or (u'source:housenumber' in keys) or (u'source:lanes' in keys) or (u'source:lit' in keys) or (u'source:maxaxleload' in keys) or (u'source:maxspeed' in keys) or (u'source:maxspeed:backward' in keys) or (u'source:maxspeed:forward' in keys) or (u'source:name' in keys) or (u'source:old_name' in keys) or (u'source:population' in keys) or (u'source:postal_code' in keys) or (u'source:postcode' in keys) or (u'source:ref' in keys) or (u'source:ref:INSEE' in keys) or (u'source:surface' in keys): + if (u'border_type' in keys) or (u'ntd_id' in keys) or (u'piste:difficulty' in keys) or (u'place' in keys) or (u'source:addr' in keys) or (u'source:addr:housenumber' in keys) or (u'source:addr:postcode' in keys) or (u'source:bicycle' in keys) or (u'source:bridge' in keys) or (u'source:building' in keys) or (u'source:date' in keys) or (u'source:designation' in keys) or (u'source:ele' in keys) or (u'source:height' in keys) or (u'source:hgv' in keys) or (u'source:highway' in keys) or (u'source:housenumber' in keys) or (u'source:lanes' in keys) or (u'source:lit' in keys) or (u'source:maxaxleload' in keys) or (u'source:maxspeed' in keys) or (u'source:maxspeed:backward' in keys) or (u'source:maxspeed:forward' in keys) or (u'source:name' in keys) or (u'source:old_name' in keys) or (u'source:population' in keys) or (u'source:postal_code' in keys) or (u'source:postcode' in keys) or (u'source:ref' in keys) or (u'source:ref:INSEE' in keys) or (u'source:surface' in keys) or (u'transformer' in keys): match = False if not match: capture_tags = {} @@ -98,6 +99,10 @@ def node(self, data, tags): capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place') and not mapcss._tag_capture(capture_tags, 1, tags, u'name') and mapcss._tag_capture(capture_tags, 2, tags, u'place') != mapcss._value_const_capture(capture_tags, 2, u'islet', u'islet')) except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'transformer') and not mapcss._tag_capture(capture_tags, 1, tags, u'power')) + except mapcss.RuleAbort: pass if not match: capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'source:date') and not mapcss._tag_capture(capture_tags, 1, tags, u'source')) @@ -212,10 +217,13 @@ def node(self, data, tags): # assertMatch:"node source:addr:postcode=postman" # assertNoMatch:"node source:addr=postman addr:housenumber=42" # assertMatch:"node source:addr=postman" - err.append({'class': 9001001, 'subclass': 1008153779, 'text': mapcss.tr(u'{0} without {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) + err.append({'class': 9001001, 'subclass': 1373768355, 'text': mapcss.tr(u'{0} without {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) + # *[generator:source][power!=generator] + # *[generator:method][power!=generator] + # *[generator:type][power!=generator] # node[fire_hydrant:type][emergency!=fire_hydrant][disused:emergency!=fire_hydrant] - # *[transformer][!power] + # node[manhole][man_made!=manhole] # *[recycling_type][amenity!=recycling] # *[information][tourism!=information] # node[board_type][information!=board] @@ -227,15 +235,27 @@ def node(self, data, tags): # *[castle_type][historic!=castle] # *[parking][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking)$/] # *[bunker_type][military!=bunker] - if (u'artwork_type' in keys) or (u'board_type' in keys) or (u'bunker_type' in keys) or (u'castle_type' in keys) or (u'fire_hydrant:type' in keys) or (u'information' in keys) or (u'lamp_type' in keys) or (u'map_type' in keys) or (u'parking' in keys) or (u'recycling_type' in keys) or (u'shelter_type' in keys) or (u'site_type' in keys) or (u'transformer' in keys): + if (u'artwork_type' in keys) or (u'board_type' in keys) or (u'bunker_type' in keys) or (u'castle_type' in keys) or (u'fire_hydrant:type' in keys) or (u'generator:method' in keys) or (u'generator:source' in keys) or (u'generator:type' in keys) or (u'information' in keys) or (u'lamp_type' in keys) or (u'manhole' in keys) or (u'map_type' in keys) or (u'parking' in keys) or (u'recycling_type' in keys) or (u'shelter_type' in keys) or (u'site_type' in keys): match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:source') and mapcss._tag_capture(capture_tags, 1, tags, u'power') != mapcss._value_const_capture(capture_tags, 1, u'generator', u'generator')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') and mapcss._tag_capture(capture_tags, 1, tags, u'power') != mapcss._value_const_capture(capture_tags, 1, u'generator', u'generator')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:type') and mapcss._tag_capture(capture_tags, 1, tags, u'power') != mapcss._value_const_capture(capture_tags, 1, u'generator', u'generator')) + except mapcss.RuleAbort: pass if not match: capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fire_hydrant:type') and mapcss._tag_capture(capture_tags, 1, tags, u'emergency') != mapcss._value_const_capture(capture_tags, 1, u'fire_hydrant', u'fire_hydrant') and mapcss._tag_capture(capture_tags, 2, tags, u'disused:emergency') != mapcss._value_const_capture(capture_tags, 2, u'fire_hydrant', u'fire_hydrant')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'transformer') and not mapcss._tag_capture(capture_tags, 1, tags, u'power')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'manhole') and mapcss._tag_capture(capture_tags, 1, tags, u'man_made') != mapcss._value_const_capture(capture_tags, 1, u'manhole', u'manhole')) except mapcss.RuleAbort: pass if not match: capture_tags = {} @@ -284,13 +304,23 @@ def node(self, data, tags): if match: # group:tr("missing tag") # throwWarning:tr("{0} without {1}","{0.key}","{1.tag}") - err.append({'class': 9001001, 'subclass': 880056674, 'text': mapcss.tr(u'{0} without {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + err.append({'class': 9001001, 'subclass': 846163887, 'text': mapcss.tr(u'{0} without {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + # *[iata][aeroway!=aerodrome][aeroway!=helipad] + # *[icao][aeroway!=aerodrome][aeroway!=helipad] # *[bridge:movable][bridge!=movable][man_made!=bridge] # *[substation][power!=substation][pipeline!=substation] # *[reservoir_type][landuse!=reservoir][water!=reservoir] - if (u'bridge:movable' in keys) or (u'reservoir_type' in keys) or (u'substation' in keys): + if (u'bridge:movable' in keys) or (u'iata' in keys) or (u'icao' in keys) or (u'reservoir_type' in keys) or (u'substation' in keys): match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'iata') and mapcss._tag_capture(capture_tags, 1, tags, u'aeroway') != mapcss._value_const_capture(capture_tags, 1, u'aerodrome', u'aerodrome') and mapcss._tag_capture(capture_tags, 2, tags, u'aeroway') != mapcss._value_const_capture(capture_tags, 2, u'helipad', u'helipad')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'icao') and mapcss._tag_capture(capture_tags, 1, tags, u'aeroway') != mapcss._value_const_capture(capture_tags, 1, u'aerodrome', u'aerodrome') and mapcss._tag_capture(capture_tags, 2, tags, u'aeroway') != mapcss._value_const_capture(capture_tags, 2, u'helipad', u'helipad')) + except mapcss.RuleAbort: pass if not match: capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge:movable') and mapcss._tag_capture(capture_tags, 1, tags, u'bridge') != mapcss._value_const_capture(capture_tags, 1, u'movable', u'movable') and mapcss._tag_capture(capture_tags, 2, tags, u'man_made') != mapcss._value_const_capture(capture_tags, 2, u'bridge', u'bridge')) @@ -306,7 +336,7 @@ def node(self, data, tags): if match: # group:tr("missing tag") # throwWarning:tr("{0} without {1} or {2}","{0.key}","{1.tag}","{2.tag}") - err.append({'class': 9001001, 'subclass': 1195794842, 'text': mapcss.tr(u'{0} without {1} or {2}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'), mapcss._tag_uncapture(capture_tags, u'{2.tag}'))}) + err.append({'class': 9001001, 'subclass': 1276936968, 'text': mapcss.tr(u'{0} without {1} or {2}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'), mapcss._tag_uncapture(capture_tags, u'{2.tag}'))}) # node[traffic_sign=maxspeed][!maxspeed] # node[actuator=manual][!handle] @@ -482,6 +512,11 @@ def node(self, data, tags): # throwWarning:tr("{0} together with {1}","{0.tag}","{1.key}") err.append({'class': 9001002, 'subclass': 93781778, 'text': mapcss.tr(u'{0} together with {1}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) + # *[amenity=police][police] + # node[highway=crossing][crossing=no] + # node[railway=crossing][crossing=no] + # Use undeclared class unpaved_surface + # *[building:part][building] # *[addr:street][addr:place][outside("CZ,DK")] if (u'addr:place' in keys and u'addr:street' in keys) or (u'building' in keys and u'building:part' in keys): @@ -600,7 +635,7 @@ def node(self, data, tags): # *[bridge][!highway][!railway][!waterway][!piste:type][public_transport!=platform][route!=ferry][man_made!=pipeline][man_made!=goods_conveyor][man_made!=wildlife_crossing][man_made!=bridge][building!=bridge] # *[psv][!highway][!railway][!waterway][barrier!=bollard][amenity!~/^parking.*/] # *[width][!highway][!railway][!waterway][!aeroway][!cycleway][!footway][!barrier][!man_made][!entrance][natural!=stone][leisure!=track] - # *[maxspeed][!highway][!railway][traffic_sign!~/^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][type!=enforcement][waterway!~/^(river|canal|lock)$/][!traffic_calming][aerialway!=zip_line] + # *[maxspeed][!highway][!railway][traffic_sign!~/^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][traffic_sign:forward!~/^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][traffic_sign:backward!~/^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][type!=enforcement][waterway!~/^(river|canal|lock)$/][!traffic_calming][aerialway!=zip_line] if (u'bridge' in keys) or (u'maxspeed' in keys) or (u'psv' in keys) or (u'tunnel' in keys) or (u'width' in keys): match = False if not match: @@ -621,12 +656,12 @@ def node(self, data, tags): except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'maxspeed') and not mapcss._tag_capture(capture_tags, 1, tags, u'highway') and not mapcss._tag_capture(capture_tags, 2, tags, u'railway') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 3, self.re_27d9cb1c, u'^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$'), mapcss._tag_capture(capture_tags, 3, tags, u'traffic_sign')) and mapcss._tag_capture(capture_tags, 4, tags, u'type') != mapcss._value_const_capture(capture_tags, 4, u'enforcement', u'enforcement') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 5, self.re_46fc3877, u'^(river|canal|lock)$'), mapcss._tag_capture(capture_tags, 5, tags, u'waterway')) and not mapcss._tag_capture(capture_tags, 6, tags, u'traffic_calming') and mapcss._tag_capture(capture_tags, 7, tags, u'aerialway') != mapcss._value_const_capture(capture_tags, 7, u'zip_line', u'zip_line')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'maxspeed') and not mapcss._tag_capture(capture_tags, 1, tags, u'highway') and not mapcss._tag_capture(capture_tags, 2, tags, u'railway') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 3, self.re_27d9cb1c, u'^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$'), mapcss._tag_capture(capture_tags, 3, tags, u'traffic_sign')) and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 4, self.re_27d9cb1c, u'^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$'), mapcss._tag_capture(capture_tags, 4, tags, u'traffic_sign:forward')) and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 5, self.re_27d9cb1c, u'^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$'), mapcss._tag_capture(capture_tags, 5, tags, u'traffic_sign:backward')) and mapcss._tag_capture(capture_tags, 6, tags, u'type') != mapcss._value_const_capture(capture_tags, 6, u'enforcement', u'enforcement') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 7, self.re_46fc3877, u'^(river|canal|lock)$'), mapcss._tag_capture(capture_tags, 7, tags, u'waterway')) and not mapcss._tag_capture(capture_tags, 8, tags, u'traffic_calming') and mapcss._tag_capture(capture_tags, 9, tags, u'aerialway') != mapcss._value_const_capture(capture_tags, 9, u'zip_line', u'zip_line')) except mapcss.RuleAbort: pass if match: # group:tr("suspicious tag combination") # throwWarning:tr("{0} on suspicious object","{0.key}") - err.append({'class': 9001002, 'subclass': 1334545086, 'text': mapcss.tr(u'{0} on suspicious object', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + err.append({'class': 9001002, 'subclass': 1541071620, 'text': mapcss.tr(u'{0} on suspicious object', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) # *[highway][waterway][waterway!=dam][waterway!=weir] # *[landuse][building][landuse!=retail] @@ -777,13 +812,56 @@ def node(self, data, tags): u'leisure']) }}) + # *[highway=cycleway][cycleway=track] + if (u'cycleway' in keys and u'highway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'cycleway') and mapcss._tag_capture(capture_tags, 1, tags, u'cycleway') == mapcss._value_capture(capture_tags, 1, u'track')) + except mapcss.RuleAbort: pass + if match: + # group:tr("suspicious tag combination") + # throwWarning:tr("{0} together with {1}. Remove {1}.","{0.tag}","{1.tag}") + # fixRemove:"cycleway" + err.append({'class': 9001002, 'subclass': 563138279, 'text': mapcss.tr(u'{0} together with {1}. Remove {1}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'cycleway']) + }}) + + # node[emergency_ward_entrance][emergency!=emergency_ward_entrance] + if (u'emergency_ward_entrance' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'emergency_ward_entrance') and mapcss._tag_capture(capture_tags, 1, tags, u'emergency') != mapcss._value_const_capture(capture_tags, 1, u'emergency_ward_entrance', u'emergency_ward_entrance')) + except mapcss.RuleAbort: pass + if match: + # group:tr("missing tag") + # throwWarning:tr("{0} without {1}","{0.tag}","{1.tag}") + # fixAdd:"emergency=emergency_ward_entrance" + err.append({'class': 9001001, 'subclass': 1567634001, 'text': mapcss.tr(u'{0} without {1}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'emergency',u'emergency_ward_entrance']]) + }}) + return err def way(self, data, tags, nds): capture_tags = {} keys = tags.keys() err = [] - set_AllSameMaxspeed = False + set_AllSameMaxspeed = set_unpaved_surface = False + + # way[surface=~/^(unpaved|compacted|gravel|fine_gravel|pebblestone|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips)$/] + if (u'surface' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss.regexp_test(mapcss._value_capture(capture_tags, 0, self.re_6f957488), mapcss._tag_capture(capture_tags, 0, tags, u'surface'))) + except mapcss.RuleAbort: pass + if match: + # setunpaved_surface + set_unpaved_surface = True # way[junction][!highway][junction!=yes] # way[lanes][!highway][leisure!=track][leisure!=swimming_pool] @@ -823,6 +901,7 @@ def way(self, data, tags, nds): # *[border_type][!boundary] # *[piste:difficulty][!piste:type] # *[place][!name][place!=islet] + # *[transformer][!power] # *[source:date][!source] # *[source:name][!name] # *[source:maxspeed:forward][!maxspeed:forward][!maxspeed] @@ -850,7 +929,7 @@ def way(self, data, tags, nds): # *[source:addr:housenumber][!addr:housenumber] # *[source:addr][!/^addr:/] # *[source:maxspeed][!/^maxspeed:?/] - if (u'border_type' in keys) or (u'canal' in keys) or (u'detail' in keys) or (u'eddy_current_brake' in keys) or (u'electrified' in keys) or (u'etcs' in keys) or (u'gauge' in keys) or (u'grade_of_track' in keys) or (u'have_riverbank' in keys) or (u'junction' in keys) or (u'kursbuchstrecke' in keys) or (u'lanes' in keys) or (u'length_unit' in keys) or (u'living_street' in keys) or (u'lzb' in keys) or (u'maintenance' in keys) or (u'median' in keys) or (u'motorroad' in keys) or (u'old_railway_operator' in keys) or (u'operating_procedure' in keys) or (u'piste:difficulty' in keys) or (u'place' in keys) or (u'pzb' in keys) or (u'sac_scale' in keys) or (u'sidewalk' in keys) or (u'source:addr' in keys) or (u'source:addr:housenumber' in keys) or (u'source:addr:postcode' in keys) or (u'source:bicycle' in keys) or (u'source:bridge' in keys) or (u'source:building' in keys) or (u'source:date' in keys) or (u'source:designation' in keys) or (u'source:ele' in keys) or (u'source:height' in keys) or (u'source:hgv' in keys) or (u'source:highway' in keys) or (u'source:housenumber' in keys) or (u'source:lanes' in keys) or (u'source:lit' in keys) or (u'source:maxaxleload' in keys) or (u'source:maxspeed' in keys) or (u'source:maxspeed:backward' in keys) or (u'source:maxspeed:forward' in keys) or (u'source:name' in keys) or (u'source:old_name' in keys) or (u'source:population' in keys) or (u'source:postal_code' in keys) or (u'source:postcode' in keys) or (u'source:ref' in keys) or (u'source:ref:INSEE' in keys) or (u'source:surface' in keys) or (u'step_count' in keys) or (u'stream' in keys) or (u'structure_gauge' in keys) or (u'tilting_technology' in keys) or (u'track_class' in keys) or (u'tracks' in keys) or (u'tracktype' in keys) or (u'traffic_mode' in keys) or (u'trail_visibility' in keys) or (u'trolley_wire' in keys) or (u'workrules' in keys) or (u'zip_left' in keys) or (u'zip_right' in keys): + if (u'border_type' in keys) or (u'canal' in keys) or (u'detail' in keys) or (u'eddy_current_brake' in keys) or (u'electrified' in keys) or (u'etcs' in keys) or (u'gauge' in keys) or (u'grade_of_track' in keys) or (u'have_riverbank' in keys) or (u'junction' in keys) or (u'kursbuchstrecke' in keys) or (u'lanes' in keys) or (u'length_unit' in keys) or (u'living_street' in keys) or (u'lzb' in keys) or (u'maintenance' in keys) or (u'median' in keys) or (u'motorroad' in keys) or (u'old_railway_operator' in keys) or (u'operating_procedure' in keys) or (u'piste:difficulty' in keys) or (u'place' in keys) or (u'pzb' in keys) or (u'sac_scale' in keys) or (u'sidewalk' in keys) or (u'source:addr' in keys) or (u'source:addr:housenumber' in keys) or (u'source:addr:postcode' in keys) or (u'source:bicycle' in keys) or (u'source:bridge' in keys) or (u'source:building' in keys) or (u'source:date' in keys) or (u'source:designation' in keys) or (u'source:ele' in keys) or (u'source:height' in keys) or (u'source:hgv' in keys) or (u'source:highway' in keys) or (u'source:housenumber' in keys) or (u'source:lanes' in keys) or (u'source:lit' in keys) or (u'source:maxaxleload' in keys) or (u'source:maxspeed' in keys) or (u'source:maxspeed:backward' in keys) or (u'source:maxspeed:forward' in keys) or (u'source:name' in keys) or (u'source:old_name' in keys) or (u'source:population' in keys) or (u'source:postal_code' in keys) or (u'source:postcode' in keys) or (u'source:ref' in keys) or (u'source:ref:INSEE' in keys) or (u'source:surface' in keys) or (u'step_count' in keys) or (u'stream' in keys) or (u'structure_gauge' in keys) or (u'tilting_technology' in keys) or (u'track_class' in keys) or (u'tracks' in keys) or (u'tracktype' in keys) or (u'traffic_mode' in keys) or (u'trail_visibility' in keys) or (u'transformer' in keys) or (u'trolley_wire' in keys) or (u'workrules' in keys) or (u'zip_left' in keys) or (u'zip_right' in keys): match = False if not match: capture_tags = {} @@ -1004,6 +1083,10 @@ def way(self, data, tags, nds): capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place') and not mapcss._tag_capture(capture_tags, 1, tags, u'name') and mapcss._tag_capture(capture_tags, 2, tags, u'place') != mapcss._value_const_capture(capture_tags, 2, u'islet', u'islet')) except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'transformer') and not mapcss._tag_capture(capture_tags, 1, tags, u'power')) + except mapcss.RuleAbort: pass if not match: capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'source:date') and not mapcss._tag_capture(capture_tags, 1, tags, u'source')) @@ -1117,9 +1200,11 @@ def way(self, data, tags, nds): # throwWarning:tr("{0} without {1}","{0.key}","{1.key}") # assertNoMatch:"way lanes=42 highway=unclassified" # assertMatch:"way lanes=42" - err.append({'class': 9001001, 'subclass': 2049980645, 'text': mapcss.tr(u'{0} without {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) + err.append({'class': 9001001, 'subclass': 2059602493, 'text': mapcss.tr(u'{0} without {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) - # *[transformer][!power] + # *[generator:source][power!=generator] + # *[generator:method][power!=generator] + # *[generator:type][power!=generator] # way[fence_type][barrier!=fence] # *[recycling_type][amenity!=recycling] # *[information][tourism!=information] @@ -1130,11 +1215,19 @@ def way(self, data, tags, nds): # *[parking][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking)$/] # way[cutline][man_made!=cutline] # *[bunker_type][military!=bunker] - if (u'artwork_type' in keys) or (u'bunker_type' in keys) or (u'castle_type' in keys) or (u'cutline' in keys) or (u'fence_type' in keys) or (u'information' in keys) or (u'parking' in keys) or (u'recycling_type' in keys) or (u'shelter_type' in keys) or (u'site_type' in keys) or (u'transformer' in keys): + if (u'artwork_type' in keys) or (u'bunker_type' in keys) or (u'castle_type' in keys) or (u'cutline' in keys) or (u'fence_type' in keys) or (u'generator:method' in keys) or (u'generator:source' in keys) or (u'generator:type' in keys) or (u'information' in keys) or (u'parking' in keys) or (u'recycling_type' in keys) or (u'shelter_type' in keys) or (u'site_type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'transformer') and not mapcss._tag_capture(capture_tags, 1, tags, u'power')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:source') and mapcss._tag_capture(capture_tags, 1, tags, u'power') != mapcss._value_const_capture(capture_tags, 1, u'generator', u'generator')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') and mapcss._tag_capture(capture_tags, 1, tags, u'power') != mapcss._value_const_capture(capture_tags, 1, u'generator', u'generator')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:type') and mapcss._tag_capture(capture_tags, 1, tags, u'power') != mapcss._value_const_capture(capture_tags, 1, u'generator', u'generator')) except mapcss.RuleAbort: pass if not match: capture_tags = {} @@ -1179,14 +1272,24 @@ def way(self, data, tags, nds): if match: # group:tr("missing tag") # throwWarning:tr("{0} without {1}","{0.key}","{1.tag}") - err.append({'class': 9001001, 'subclass': 1572004164, 'text': mapcss.tr(u'{0} without {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + err.append({'class': 9001001, 'subclass': 1441432900, 'text': mapcss.tr(u'{0} without {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + # *[iata][aeroway!=aerodrome][aeroway!=helipad] + # *[icao][aeroway!=aerodrome][aeroway!=helipad] # *[bridge:movable][bridge!=movable][man_made!=bridge] # *[substation][power!=substation][pipeline!=substation] # *[reservoir_type][landuse!=reservoir][water!=reservoir] # way[waterway=pressurised][tunnel!=flooded][man_made!=pipeline] - if (u'bridge:movable' in keys) or (u'reservoir_type' in keys) or (u'substation' in keys) or (u'waterway' in keys): + if (u'bridge:movable' in keys) or (u'iata' in keys) or (u'icao' in keys) or (u'reservoir_type' in keys) or (u'substation' in keys) or (u'waterway' in keys): match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'iata') and mapcss._tag_capture(capture_tags, 1, tags, u'aeroway') != mapcss._value_const_capture(capture_tags, 1, u'aerodrome', u'aerodrome') and mapcss._tag_capture(capture_tags, 2, tags, u'aeroway') != mapcss._value_const_capture(capture_tags, 2, u'helipad', u'helipad')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'icao') and mapcss._tag_capture(capture_tags, 1, tags, u'aeroway') != mapcss._value_const_capture(capture_tags, 1, u'aerodrome', u'aerodrome') and mapcss._tag_capture(capture_tags, 2, tags, u'aeroway') != mapcss._value_const_capture(capture_tags, 2, u'helipad', u'helipad')) + except mapcss.RuleAbort: pass if not match: capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge:movable') and mapcss._tag_capture(capture_tags, 1, tags, u'bridge') != mapcss._value_const_capture(capture_tags, 1, u'movable', u'movable') and mapcss._tag_capture(capture_tags, 2, tags, u'man_made') != mapcss._value_const_capture(capture_tags, 2, u'bridge', u'bridge')) @@ -1206,7 +1309,7 @@ def way(self, data, tags, nds): if match: # group:tr("missing tag") # throwWarning:tr("{0} without {1} or {2}","{0.key}","{1.tag}","{2.tag}") - err.append({'class': 9001001, 'subclass': 214618643, 'text': mapcss.tr(u'{0} without {1} or {2}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'), mapcss._tag_uncapture(capture_tags, u'{2.tag}'))}) + err.append({'class': 9001001, 'subclass': 269128108, 'text': mapcss.tr(u'{0} without {1} or {2}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'), mapcss._tag_uncapture(capture_tags, u'{2.tag}'))}) # way[boundary=administrative][!admin_level] # *[tourism=information][!information] @@ -1333,7 +1436,7 @@ def way(self, data, tags, nds): if match: # group:tr("missing tag") # throwWarning:tr("{0} without {1}, {2} or {3}","{0.key}","{1.key}","{2.key}","{3.key}") - err.append({'class': 9001001, 'subclass': 1893317839, 'text': mapcss.tr(u'{0} without {1}, {2} or {3}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{2.key}'), mapcss._tag_uncapture(capture_tags, u'{3.key}'))}) + err.append({'class': 9001001, 'subclass': 1354698914, 'text': mapcss.tr(u'{0} without {1}, {2} or {3}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{2.key}'), mapcss._tag_uncapture(capture_tags, u'{3.key}'))}) # way[incline][!highway][!railway][aeroway!~/^(runway|taxiway)$/][attraction!=summer_toboggan] # *[toll][!highway][!barrier][route!~/^(ferry|road)$/] @@ -1416,22 +1519,27 @@ def way(self, data, tags, nds): # assertMatch:"way power=plant generator:source=wind" err.append({'class': 9001002, 'subclass': 1953339020, 'text': mapcss.tr(u'{0} together with {1}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) + # *[amenity=police][police] # way[junction=yes][highway] - # way[tracktype=grade1][surface][surface=~/^(unpaved|compacted|gravel|fine_gravel|pebblestone|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips)$/] + # way[tracktype=grade1][surface].unpaved_surface # way[tracktype=grade2][surface][surface=~/^(sand|mud)$/] # way[segregated][bicycle=no] # way[segregated][foot=no] # way[man_made=pipeline][tunnel=flooded] # way[waterway=canal][tunnel=yes] - if (u'bicycle' in keys and u'segregated' in keys) or (u'foot' in keys and u'segregated' in keys) or (u'highway' in keys and u'junction' in keys) or (u'man_made' in keys and u'tunnel' in keys) or (u'surface' in keys and u'tracktype' in keys) or (u'tunnel' in keys and u'waterway' in keys): + if (u'amenity' in keys and u'police' in keys) or (u'bicycle' in keys and u'segregated' in keys) or (u'foot' in keys and u'segregated' in keys) or (u'highway' in keys and u'junction' in keys) or (u'man_made' in keys and u'tunnel' in keys) or (u'surface' in keys and u'tracktype' in keys) or (u'tunnel' in keys and u'waterway' in keys): match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'police') and mapcss._tag_capture(capture_tags, 1, tags, u'police')) + except mapcss.RuleAbort: pass if not match: capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'junction') == mapcss._value_capture(capture_tags, 0, u'yes') and mapcss._tag_capture(capture_tags, 1, tags, u'highway')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tracktype') == mapcss._value_capture(capture_tags, 0, u'grade1') and mapcss._tag_capture(capture_tags, 1, tags, u'surface') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 2, self.re_6f957488), mapcss._tag_capture(capture_tags, 2, tags, u'surface'))) + try: match = (set_unpaved_surface and mapcss._tag_capture(capture_tags, 0, tags, u'tracktype') == mapcss._value_capture(capture_tags, 0, u'grade1') and mapcss._tag_capture(capture_tags, 1, tags, u'surface')) except mapcss.RuleAbort: pass if not match: capture_tags = {} @@ -1456,25 +1564,7 @@ def way(self, data, tags, nds): if match: # group:tr("suspicious tag combination") # throwWarning:tr("{0} together with {1}","{0.tag}","{1.tag}") - err.append({'class': 9001002, 'subclass': 1073363078, 'text': mapcss.tr(u'{0} together with {1}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) - - # way[highway=footway][bicycle=designated] - # way[highway=cycleway][foot=designated] - if (u'bicycle' in keys and u'highway' in keys) or (u'foot' in keys and u'highway' in keys): - match = False - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'footway') and mapcss._tag_capture(capture_tags, 1, tags, u'bicycle') == mapcss._value_capture(capture_tags, 1, u'designated')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'cycleway') and mapcss._tag_capture(capture_tags, 1, tags, u'foot') == mapcss._value_capture(capture_tags, 1, u'designated')) - except mapcss.RuleAbort: pass - if match: - # group:tr("suspicious tag combination") - # throwWarning:tr("{0} together with {1}","{0.tag}","{1.tag}") - # suggestAlternative:"highway=path" - err.append({'class': 9001002, 'subclass': 892898288, 'text': mapcss.tr(u'{0} together with {1}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + err.append({'class': 9001002, 'subclass': 16043731, 'text': mapcss.tr(u'{0} together with {1}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) # *[building:part][building] # *[addr:street][addr:place][outside("CZ,DK")] @@ -1683,7 +1773,7 @@ def way(self, data, tags, nds): # *[bridge][!highway][!railway][!waterway][!piste:type][public_transport!=platform][route!=ferry][man_made!=pipeline][man_made!=goods_conveyor][man_made!=wildlife_crossing][man_made!=bridge][building!=bridge] # *[psv][!highway][!railway][!waterway][barrier!=bollard][amenity!~/^parking.*/] # *[width][!highway][!railway][!waterway][!aeroway][!cycleway][!footway][!barrier][!man_made][!entrance][natural!=stone][leisure!=track] - # *[maxspeed][!highway][!railway][traffic_sign!~/^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][type!=enforcement][waterway!~/^(river|canal|lock)$/][!traffic_calming][aerialway!=zip_line] + # *[maxspeed][!highway][!railway][traffic_sign!~/^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][traffic_sign:forward!~/^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][traffic_sign:backward!~/^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][type!=enforcement][waterway!~/^(river|canal|lock)$/][!traffic_calming][aerialway!=zip_line] if (u'bridge' in keys) or (u'maxspeed' in keys) or (u'psv' in keys) or (u'tunnel' in keys) or (u'width' in keys): match = False if not match: @@ -1704,12 +1794,12 @@ def way(self, data, tags, nds): except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'maxspeed') and not mapcss._tag_capture(capture_tags, 1, tags, u'highway') and not mapcss._tag_capture(capture_tags, 2, tags, u'railway') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 3, self.re_27d9cb1c, u'^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$'), mapcss._tag_capture(capture_tags, 3, tags, u'traffic_sign')) and mapcss._tag_capture(capture_tags, 4, tags, u'type') != mapcss._value_const_capture(capture_tags, 4, u'enforcement', u'enforcement') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 5, self.re_46fc3877, u'^(river|canal|lock)$'), mapcss._tag_capture(capture_tags, 5, tags, u'waterway')) and not mapcss._tag_capture(capture_tags, 6, tags, u'traffic_calming') and mapcss._tag_capture(capture_tags, 7, tags, u'aerialway') != mapcss._value_const_capture(capture_tags, 7, u'zip_line', u'zip_line')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'maxspeed') and not mapcss._tag_capture(capture_tags, 1, tags, u'highway') and not mapcss._tag_capture(capture_tags, 2, tags, u'railway') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 3, self.re_27d9cb1c, u'^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$'), mapcss._tag_capture(capture_tags, 3, tags, u'traffic_sign')) and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 4, self.re_27d9cb1c, u'^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$'), mapcss._tag_capture(capture_tags, 4, tags, u'traffic_sign:forward')) and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 5, self.re_27d9cb1c, u'^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$'), mapcss._tag_capture(capture_tags, 5, tags, u'traffic_sign:backward')) and mapcss._tag_capture(capture_tags, 6, tags, u'type') != mapcss._value_const_capture(capture_tags, 6, u'enforcement', u'enforcement') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 7, self.re_46fc3877, u'^(river|canal|lock)$'), mapcss._tag_capture(capture_tags, 7, tags, u'waterway')) and not mapcss._tag_capture(capture_tags, 8, tags, u'traffic_calming') and mapcss._tag_capture(capture_tags, 9, tags, u'aerialway') != mapcss._value_const_capture(capture_tags, 9, u'zip_line', u'zip_line')) except mapcss.RuleAbort: pass if match: # group:tr("suspicious tag combination") # throwWarning:tr("{0} on suspicious object","{0.key}") - err.append({'class': 9001002, 'subclass': 1334545086, 'text': mapcss.tr(u'{0} on suspicious object', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + err.append({'class': 9001002, 'subclass': 1541071620, 'text': mapcss.tr(u'{0} on suspicious object', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) # way[highway][barrier] # *[highway][waterway][waterway!=dam][waterway!=weir] @@ -2048,17 +2138,56 @@ def way(self, data, tags, nds): [u'highway',u'footway']]) }}) + # *[highway=cycleway][cycleway=track] + if (u'cycleway' in keys and u'highway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'cycleway') and mapcss._tag_capture(capture_tags, 1, tags, u'cycleway') == mapcss._value_capture(capture_tags, 1, u'track')) + except mapcss.RuleAbort: pass + if match: + # group:tr("suspicious tag combination") + # throwWarning:tr("{0} together with {1}. Remove {1}.","{0.tag}","{1.tag}") + # fixRemove:"cycleway" + err.append({'class': 9001002, 'subclass': 563138279, 'text': mapcss.tr(u'{0} together with {1}. Remove {1}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'cycleway']) + }}) + + # way[highway=path][foot][foot!=no][!segregated][bicycle][bicycle!=no]!.unpaved_surface + # way[highway=footway][bicycle][bicycle!=no][!segregated]!.unpaved_surface + # way[highway=cycleway][foot][foot!=no][!segregated]!.unpaved_surface + if (u'bicycle' in keys and u'foot' in keys and u'highway' in keys) or (u'bicycle' in keys and u'highway' in keys) or (u'foot' in keys and u'highway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (not set_unpaved_surface and mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'path') and mapcss._tag_capture(capture_tags, 1, tags, u'foot') and mapcss._tag_capture(capture_tags, 2, tags, u'foot') != mapcss._value_const_capture(capture_tags, 2, u'no', u'no') and not mapcss._tag_capture(capture_tags, 3, tags, u'segregated') and mapcss._tag_capture(capture_tags, 4, tags, u'bicycle') and mapcss._tag_capture(capture_tags, 5, tags, u'bicycle') != mapcss._value_const_capture(capture_tags, 5, u'no', u'no')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (not set_unpaved_surface and mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'footway') and mapcss._tag_capture(capture_tags, 1, tags, u'bicycle') and mapcss._tag_capture(capture_tags, 2, tags, u'bicycle') != mapcss._value_const_capture(capture_tags, 2, u'no', u'no') and not mapcss._tag_capture(capture_tags, 3, tags, u'segregated')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (not set_unpaved_surface and mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'cycleway') and mapcss._tag_capture(capture_tags, 1, tags, u'foot') and mapcss._tag_capture(capture_tags, 2, tags, u'foot') != mapcss._value_const_capture(capture_tags, 2, u'no', u'no') and not mapcss._tag_capture(capture_tags, 3, tags, u'segregated')) + except mapcss.RuleAbort: pass + if match: + # group:tr("missing tag") + # throwWarning:tr("Combined foot- and cycleway without {1}.","{3.key}") + err.append({'class': 9001001, 'subclass': 1684739425, 'text': mapcss.tr(u'Combined foot- and cycleway without {1}.', mapcss._tag_uncapture(capture_tags, u'{3.key}'))}) + return err def relation(self, data, tags, members): capture_tags = {} keys = tags.keys() err = [] - set_AllSameMaxspeed = False + set_AllSameMaxspeed = set_unpaved_surface = False # *[border_type][!boundary] # *[piste:difficulty][!piste:type] # *[place][!name][place!=islet] + # *[transformer][!power] # *[source:date][!source] # *[source:name][!name] # *[source:maxspeed:forward][!maxspeed:forward][!maxspeed] @@ -2086,7 +2215,7 @@ def relation(self, data, tags, members): # *[source:addr:housenumber][!addr:housenumber] # *[source:addr][!/^addr:/] # *[source:maxspeed][!/^maxspeed:?/] - if (u'border_type' in keys) or (u'piste:difficulty' in keys) or (u'place' in keys) or (u'source:addr' in keys) or (u'source:addr:housenumber' in keys) or (u'source:addr:postcode' in keys) or (u'source:bicycle' in keys) or (u'source:bridge' in keys) or (u'source:building' in keys) or (u'source:date' in keys) or (u'source:designation' in keys) or (u'source:ele' in keys) or (u'source:height' in keys) or (u'source:hgv' in keys) or (u'source:highway' in keys) or (u'source:housenumber' in keys) or (u'source:lanes' in keys) or (u'source:lit' in keys) or (u'source:maxaxleload' in keys) or (u'source:maxspeed' in keys) or (u'source:maxspeed:backward' in keys) or (u'source:maxspeed:forward' in keys) or (u'source:name' in keys) or (u'source:old_name' in keys) or (u'source:population' in keys) or (u'source:postal_code' in keys) or (u'source:postcode' in keys) or (u'source:ref' in keys) or (u'source:ref:INSEE' in keys) or (u'source:surface' in keys): + if (u'border_type' in keys) or (u'piste:difficulty' in keys) or (u'place' in keys) or (u'source:addr' in keys) or (u'source:addr:housenumber' in keys) or (u'source:addr:postcode' in keys) or (u'source:bicycle' in keys) or (u'source:bridge' in keys) or (u'source:building' in keys) or (u'source:date' in keys) or (u'source:designation' in keys) or (u'source:ele' in keys) or (u'source:height' in keys) or (u'source:hgv' in keys) or (u'source:highway' in keys) or (u'source:housenumber' in keys) or (u'source:lanes' in keys) or (u'source:lit' in keys) or (u'source:maxaxleload' in keys) or (u'source:maxspeed' in keys) or (u'source:maxspeed:backward' in keys) or (u'source:maxspeed:forward' in keys) or (u'source:name' in keys) or (u'source:old_name' in keys) or (u'source:population' in keys) or (u'source:postal_code' in keys) or (u'source:postcode' in keys) or (u'source:ref' in keys) or (u'source:ref:INSEE' in keys) or (u'source:surface' in keys) or (u'transformer' in keys): match = False if not match: capture_tags = {} @@ -2100,6 +2229,10 @@ def relation(self, data, tags, members): capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place') and not mapcss._tag_capture(capture_tags, 1, tags, u'name') and mapcss._tag_capture(capture_tags, 2, tags, u'place') != mapcss._value_const_capture(capture_tags, 2, u'islet', u'islet')) except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'transformer') and not mapcss._tag_capture(capture_tags, 1, tags, u'power')) + except mapcss.RuleAbort: pass if not match: capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'source:date') and not mapcss._tag_capture(capture_tags, 1, tags, u'source')) @@ -2211,9 +2344,11 @@ def relation(self, data, tags, members): if match: # group:tr("missing tag") # throwWarning:tr("{0} without {1}","{0.key}","{1.key}") - err.append({'class': 9001001, 'subclass': 1591463529, 'text': mapcss.tr(u'{0} without {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) + err.append({'class': 9001001, 'subclass': 1851814796, 'text': mapcss.tr(u'{0} without {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) - # *[transformer][!power] + # *[generator:source][power!=generator] + # *[generator:method][power!=generator] + # *[generator:type][power!=generator] # *[recycling_type][amenity!=recycling] # *[information][tourism!=information] # *[shelter_type][amenity!=shelter] @@ -2222,11 +2357,19 @@ def relation(self, data, tags, members): # *[castle_type][historic!=castle] # *[parking][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking)$/] # *[bunker_type][military!=bunker] - if (u'artwork_type' in keys) or (u'bunker_type' in keys) or (u'castle_type' in keys) or (u'information' in keys) or (u'parking' in keys) or (u'recycling_type' in keys) or (u'shelter_type' in keys) or (u'site_type' in keys) or (u'transformer' in keys): + if (u'artwork_type' in keys) or (u'bunker_type' in keys) or (u'castle_type' in keys) or (u'generator:method' in keys) or (u'generator:source' in keys) or (u'generator:type' in keys) or (u'information' in keys) or (u'parking' in keys) or (u'recycling_type' in keys) or (u'shelter_type' in keys) or (u'site_type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'transformer') and not mapcss._tag_capture(capture_tags, 1, tags, u'power')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:source') and mapcss._tag_capture(capture_tags, 1, tags, u'power') != mapcss._value_const_capture(capture_tags, 1, u'generator', u'generator')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') and mapcss._tag_capture(capture_tags, 1, tags, u'power') != mapcss._value_const_capture(capture_tags, 1, u'generator', u'generator')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:type') and mapcss._tag_capture(capture_tags, 1, tags, u'power') != mapcss._value_const_capture(capture_tags, 1, u'generator', u'generator')) except mapcss.RuleAbort: pass if not match: capture_tags = {} @@ -2263,13 +2406,23 @@ def relation(self, data, tags, members): if match: # group:tr("missing tag") # throwWarning:tr("{0} without {1}","{0.key}","{1.tag}") - err.append({'class': 9001001, 'subclass': 1270651182, 'text': mapcss.tr(u'{0} without {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + err.append({'class': 9001001, 'subclass': 970664708, 'text': mapcss.tr(u'{0} without {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + # *[iata][aeroway!=aerodrome][aeroway!=helipad] + # *[icao][aeroway!=aerodrome][aeroway!=helipad] # *[bridge:movable][bridge!=movable][man_made!=bridge] # *[substation][power!=substation][pipeline!=substation] # *[reservoir_type][landuse!=reservoir][water!=reservoir] - if (u'bridge:movable' in keys) or (u'reservoir_type' in keys) or (u'substation' in keys): + if (u'bridge:movable' in keys) or (u'iata' in keys) or (u'icao' in keys) or (u'reservoir_type' in keys) or (u'substation' in keys): match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'iata') and mapcss._tag_capture(capture_tags, 1, tags, u'aeroway') != mapcss._value_const_capture(capture_tags, 1, u'aerodrome', u'aerodrome') and mapcss._tag_capture(capture_tags, 2, tags, u'aeroway') != mapcss._value_const_capture(capture_tags, 2, u'helipad', u'helipad')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'icao') and mapcss._tag_capture(capture_tags, 1, tags, u'aeroway') != mapcss._value_const_capture(capture_tags, 1, u'aerodrome', u'aerodrome') and mapcss._tag_capture(capture_tags, 2, tags, u'aeroway') != mapcss._value_const_capture(capture_tags, 2, u'helipad', u'helipad')) + except mapcss.RuleAbort: pass if not match: capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge:movable') and mapcss._tag_capture(capture_tags, 1, tags, u'bridge') != mapcss._value_const_capture(capture_tags, 1, u'movable', u'movable') and mapcss._tag_capture(capture_tags, 2, tags, u'man_made') != mapcss._value_const_capture(capture_tags, 2, u'bridge', u'bridge')) @@ -2285,7 +2438,7 @@ def relation(self, data, tags, members): if match: # group:tr("missing tag") # throwWarning:tr("{0} without {1} or {2}","{0.key}","{1.tag}","{2.tag}") - err.append({'class': 9001001, 'subclass': 1195794842, 'text': mapcss.tr(u'{0} without {1} or {2}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'), mapcss._tag_uncapture(capture_tags, u'{2.tag}'))}) + err.append({'class': 9001001, 'subclass': 1276936968, 'text': mapcss.tr(u'{0} without {1} or {2}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'), mapcss._tag_uncapture(capture_tags, u'{2.tag}'))}) # relation[boundary=administrative][!admin_level] # relation[route=bicycle][!network][type=route] @@ -2471,6 +2624,18 @@ def relation(self, data, tags, members): # throwWarning:tr("{0} together with {1}","{0.tag}","{1.key}") err.append({'class': 9001002, 'subclass': 196575680, 'text': mapcss.tr(u'{0} together with {1}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) + # *[amenity=police][police] + if (u'amenity' in keys and u'police' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'police') and mapcss._tag_capture(capture_tags, 1, tags, u'police')) + except mapcss.RuleAbort: pass + if match: + # group:tr("suspicious tag combination") + # throwWarning:tr("{0} together with {1}","{0.tag}","{1.tag}") + err.append({'class': 9001002, 'subclass': 999404791, 'text': mapcss.tr(u'{0} together with {1}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + # relation[type=multipolygon][area=no] if (u'area' in keys and u'type' in keys): match = False @@ -2598,7 +2763,7 @@ def relation(self, data, tags, members): # *[bridge][!highway][!railway][!waterway][!piste:type][public_transport!=platform][route!=ferry][man_made!=pipeline][man_made!=goods_conveyor][man_made!=wildlife_crossing][man_made!=bridge][building!=bridge] # *[psv][!highway][!railway][!waterway][barrier!=bollard][amenity!~/^parking.*/] # *[width][!highway][!railway][!waterway][!aeroway][!cycleway][!footway][!barrier][!man_made][!entrance][natural!=stone][leisure!=track] - # *[maxspeed][!highway][!railway][traffic_sign!~/^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][type!=enforcement][waterway!~/^(river|canal|lock)$/][!traffic_calming][aerialway!=zip_line] + # *[maxspeed][!highway][!railway][traffic_sign!~/^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][traffic_sign:forward!~/^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][traffic_sign:backward!~/^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][type!=enforcement][waterway!~/^(river|canal|lock)$/][!traffic_calming][aerialway!=zip_line] if (u'bridge' in keys) or (u'maxspeed' in keys) or (u'psv' in keys) or (u'tunnel' in keys) or (u'width' in keys): match = False if not match: @@ -2619,12 +2784,12 @@ def relation(self, data, tags, members): except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'maxspeed') and not mapcss._tag_capture(capture_tags, 1, tags, u'highway') and not mapcss._tag_capture(capture_tags, 2, tags, u'railway') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 3, self.re_27d9cb1c, u'^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$'), mapcss._tag_capture(capture_tags, 3, tags, u'traffic_sign')) and mapcss._tag_capture(capture_tags, 4, tags, u'type') != mapcss._value_const_capture(capture_tags, 4, u'enforcement', u'enforcement') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 5, self.re_46fc3877, u'^(river|canal|lock)$'), mapcss._tag_capture(capture_tags, 5, tags, u'waterway')) and not mapcss._tag_capture(capture_tags, 6, tags, u'traffic_calming') and mapcss._tag_capture(capture_tags, 7, tags, u'aerialway') != mapcss._value_const_capture(capture_tags, 7, u'zip_line', u'zip_line')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'maxspeed') and not mapcss._tag_capture(capture_tags, 1, tags, u'highway') and not mapcss._tag_capture(capture_tags, 2, tags, u'railway') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 3, self.re_27d9cb1c, u'^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$'), mapcss._tag_capture(capture_tags, 3, tags, u'traffic_sign')) and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 4, self.re_27d9cb1c, u'^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$'), mapcss._tag_capture(capture_tags, 4, tags, u'traffic_sign:forward')) and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 5, self.re_27d9cb1c, u'^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$'), mapcss._tag_capture(capture_tags, 5, tags, u'traffic_sign:backward')) and mapcss._tag_capture(capture_tags, 6, tags, u'type') != mapcss._value_const_capture(capture_tags, 6, u'enforcement', u'enforcement') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 7, self.re_46fc3877, u'^(river|canal|lock)$'), mapcss._tag_capture(capture_tags, 7, tags, u'waterway')) and not mapcss._tag_capture(capture_tags, 8, tags, u'traffic_calming') and mapcss._tag_capture(capture_tags, 9, tags, u'aerialway') != mapcss._value_const_capture(capture_tags, 9, u'zip_line', u'zip_line')) except mapcss.RuleAbort: pass if match: # group:tr("suspicious tag combination") # throwWarning:tr("{0} on suspicious object","{0.key}") - err.append({'class': 9001002, 'subclass': 1334545086, 'text': mapcss.tr(u'{0} on suspicious object', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + err.append({'class': 9001002, 'subclass': 1541071620, 'text': mapcss.tr(u'{0} on suspicious object', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) # *[highway][waterway][waterway!=dam][waterway!=weir] # *[landuse][building][landuse!=retail] @@ -2763,6 +2928,22 @@ def relation(self, data, tags, members): u'male']) }}) + # *[highway=cycleway][cycleway=track] + if (u'cycleway' in keys and u'highway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'cycleway') and mapcss._tag_capture(capture_tags, 1, tags, u'cycleway') == mapcss._value_capture(capture_tags, 1, u'track')) + except mapcss.RuleAbort: pass + if match: + # group:tr("suspicious tag combination") + # throwWarning:tr("{0} together with {1}. Remove {1}.","{0.tag}","{1.tag}") + # fixRemove:"cycleway" + err.append({'class': 9001002, 'subclass': 563138279, 'text': mapcss.tr(u'{0} together with {1}. Remove {1}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{1.tag}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'cycleway']) + }}) + return err @@ -2780,9 +2961,9 @@ class father: n.init(None) data = {'id': 0, 'lat': 0, 'lon': 0} - self.check_err(n.node(data, {u'source:addr:postcode': u'postman'}), expected={'class': 9001001, 'subclass': 1008153779}) - self.check_not_err(n.node(data, {u'addr:housenumber': u'42', u'source:addr': u'postman'}), expected={'class': 9001001, 'subclass': 1008153779}) - self.check_err(n.node(data, {u'source:addr': u'postman'}), expected={'class': 9001001, 'subclass': 1008153779}) + self.check_err(n.node(data, {u'source:addr:postcode': u'postman'}), expected={'class': 9001001, 'subclass': 1373768355}) + self.check_not_err(n.node(data, {u'addr:housenumber': u'42', u'source:addr': u'postman'}), expected={'class': 9001001, 'subclass': 1373768355}) + self.check_err(n.node(data, {u'source:addr': u'postman'}), expected={'class': 9001001, 'subclass': 1373768355}) self.check_not_err(n.node(data, {u'addr:postcode': u'12345', u'place': u'foo'}), expected={'class': 9001002, 'subclass': 2039567622}) self.check_err(n.node(data, {u'addr:housenumber': u'5', u'addr:postcode': u'12345', u'place': u'foo'}), expected={'class': 9001002, 'subclass': 2039567622}) self.check_err(n.node(data, {u'addr:housenumber': u'5', u'place': u'foo'}), expected={'class': 9001002, 'subclass': 2039567622}) @@ -2793,8 +2974,8 @@ class father: self.check_not_err(n.node(data, {u'sport': u'swimming', u'tourism': u'hotel'}), expected={'class': 9001001, 'subclass': 1631566710}) self.check_not_err(n.node(data, {u'leisure': u'pitch', u'sport': u'tennis'}), expected={'class': 9001001, 'subclass': 1631566710}) self.check_err(n.node(data, {u'sport': u'tennis'}), expected={'class': 9001001, 'subclass': 1631566710}) - self.check_not_err(n.way(data, {u'highway': u'unclassified', u'lanes': u'42'}, [0]), expected={'class': 9001001, 'subclass': 2049980645}) - self.check_err(n.way(data, {u'lanes': u'42'}, [0]), expected={'class': 9001001, 'subclass': 2049980645}) + self.check_not_err(n.way(data, {u'highway': u'unclassified', u'lanes': u'42'}, [0]), expected={'class': 9001001, 'subclass': 2059602493}) + self.check_err(n.way(data, {u'lanes': u'42'}, [0]), expected={'class': 9001001, 'subclass': 2059602493}) self.check_err(n.way(data, {u'plant:source': u'combustion', u'power': u'generator'}, [0]), expected={'class': 9001002, 'subclass': 1953339020}) self.check_err(n.way(data, {u'generator:source': u'wind', u'power': u'plant'}, [0]), expected={'class': 9001002, 'subclass': 1953339020}) self.check_not_err(n.way(data, {u'highway': u'primary', u'lanes': u'2'}, [0]), expected={'class': 9001001, 'subclass': 841292752}) diff --git a/plugins/Josm_deprecated.py b/plugins/Josm_deprecated.py index a396d7d4d..85a6f7bec 100644 --- a/plugins/Josm_deprecated.py +++ b/plugins/Josm_deprecated.py @@ -29,11 +29,12 @@ def init(self, logger): self.errors[9002016] = {'item': 9002, 'level': 3, 'tag': ["tag", "deprecated"], 'desc': mapcss.tr(u'{0} is not recommended. Use the Reverse Ways function from the Tools menu.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))} self.errors[9002017] = {'item': 9002, 'level': 3, 'tag': ["tag", "deprecated"], 'desc': mapcss.tr(u'The key {0} has an uncommon value.', mapcss._tag_uncapture(capture_tags, u'{1.key}'))} self.errors[9002018] = {'item': 9002, 'level': 2, 'tag': ["tag", "deprecated"], 'desc': mapcss.tr(u'misspelled value')} - self.errors[9002019] = {'item': 9002, 'level': 2, 'tag': ["tag", "deprecated"], 'desc': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))} + self.errors[9002019] = {'item': 9002, 'level': 3, 'tag': ["tag", "deprecated"], 'desc': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))} self.re_047d5648 = re.compile(r'^(1|2|3|4|5|grade1|grade2|grade3|grade4|grade5)$') self.re_05edd24e = re.compile(r'^(alley|drive-through|drive_through|driveway|emergency_access|parking_aisle|rest_area|yes)$') self.re_0c5b5730 = re.compile(r'color:') + self.re_0f294fdf = re.compile(r'^[1-9][0-9]*$') self.re_1f92073a = re.compile(r'^(?i)fixme$') self.re_27210286 = re.compile(r'^.$') self.re_2fd4cdcf = re.compile(r'^(crossover|siding|spur|yard)$') @@ -43,9 +44,11 @@ def init(self, logger): self.re_493fd1a6 = re.compile(r'^is_in:.*$') self.re_554de4c7 = re.compile(r':color') self.re_5ee0acf2 = re.compile(r'josm\/ignore') + self.re_6029fe03 = re.compile(r'^diaper:') self.re_61b0be1b = re.compile(r'^(buoy_cardinal|buoy_installation|buoy_isolated_danger|buoy_lateral|buoy_safe_water|buoy_special_purpose|mooring)$') self.re_620f4d52 = re.compile(r'=|\+|\/|&|<|>|;|\'|\"|%|#|@|\\|,|\.|\{|\}|\?|\*|\^|\$') self.re_6d27b157 = re.compile(r'^description_[0-9]$') + self.re_787405b1 = re.compile(r'^(yes|no|limited)$') self.re_7a045a17 = re.compile(r'^(irrigation|transportation|water_power)$') @@ -53,7 +56,7 @@ def node(self, data, tags): capture_tags = {} keys = tags.keys() err = [] - set_samecolor = False + set_diaper___checked = set_diaper_checked = set_samecolor = False # *[barrier=wire_fence] if (u'barrier' in keys): @@ -981,6 +984,25 @@ def node(self, data, tags): [u'bridge',u'yes']]) }}) + # *[bridge=pontoon] + if (u'bridge' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'pontoon')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"bridge=yes + bridge:structure=floating" + # fixAdd:"bridge:structure=floating" + # fixAdd:"bridge=yes" + err.append({'class': 9002001, 'subclass': 1195531951, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'bridge:structure',u'floating'], + [u'bridge',u'yes']]) + }}) + # *[fee=interval] # *[lit=interval] # *[supervised=interval] @@ -1052,6 +1074,7 @@ def node(self, data, tags): u'parking']) }}) + # *[police=yes] # *[traffic_calming=yes] # *[access=restricted] # *[barrier=yes] @@ -1063,8 +1086,12 @@ def node(self, data, tags): # *[craft=yes] # *[service=yes] # *[place=yes] - if (u'access' in keys) or (u'aerialway' in keys) or (u'amenity' in keys) or (u'barrier' in keys) or (u'craft' in keys) or (u'leisure' in keys) or (u'place' in keys) or (u'service' in keys) or (u'shop' in keys) or (u'traffic_calming' in keys): + if (u'access' in keys) or (u'aerialway' in keys) or (u'amenity' in keys) or (u'barrier' in keys) or (u'craft' in keys) or (u'leisure' in keys) or (u'place' in keys) or (u'police' in keys) or (u'service' in keys) or (u'shop' in keys) or (u'traffic_calming' in keys): match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'police') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass if not match: capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'traffic_calming') == mapcss._value_capture(capture_tags, 0, u'yes')) @@ -1111,7 +1138,7 @@ def node(self, data, tags): except mapcss.RuleAbort: pass if match: # throwWarning:tr("{0}={1} is unspecific. Please replace ''{1}'' by a specific value.","{0.key}","{0.value}") - err.append({'class': 9002007, 'subclass': 962298405, 'text': mapcss.tr(u'{0}={1} is unspecific. Please replace \'\'{1}\'\' by a specific value.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) + err.append({'class': 9002007, 'subclass': 1089883099, 'text': mapcss.tr(u'{0}={1} is unspecific. Please replace \'\'{1}\'\' by a specific value.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) # *[place_name][!name] if (u'place_name' in keys): @@ -2184,9 +2211,14 @@ def node(self, data, tags): # suggestAlternative:"shop=lottery" err.append({'class': 9002001, 'subclass': 1955724853, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # *[office=real_estate] # *[office=real_estate_agent] if (u'office' in keys): match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'office') == mapcss._value_capture(capture_tags, 0, u'real_estate')) + except mapcss.RuleAbort: pass if not match: capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'office') == mapcss._value_capture(capture_tags, 0, u'real_estate_agent')) @@ -2194,9 +2226,9 @@ def node(self, data, tags): if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"office=estate_agent " - # fixAdd:"office=estate_agent " - err.append({'class': 9002001, 'subclass': 1340846055, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"office=estate_agent" + # fixAdd:"office=estate_agent" + err.append({'class': 9002001, 'subclass': 2027311706, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ [u'office',u'estate_agent']]) }}) @@ -2219,8 +2251,9 @@ def node(self, data, tags): # *[amenity=proposed] # *[amenity=disused] # *[shop=disused] + # *[highway=abandoned] # *[historic=abandoned] - if (u'amenity' in keys) or (u'historic' in keys) or (u'shop' in keys): + if (u'amenity' in keys) or (u'highway' in keys) or (u'historic' in keys) or (u'shop' in keys): match = False if not match: capture_tags = {} @@ -2238,6 +2271,10 @@ def node(self, data, tags): capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'disused')) except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'abandoned')) + except mapcss.RuleAbort: pass if not match: capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'historic') == mapcss._value_capture(capture_tags, 0, u'abandoned')) @@ -2245,7 +2282,7 @@ def node(self, data, tags): if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated. Use the {1}: key prefix instead.","{0.tag}","{0.value}") - err.append({'class': 9002001, 'subclass': 283558204, 'text': mapcss.tr(u'{0} is deprecated. Use the {1}: key prefix instead.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) + err.append({'class': 9002001, 'subclass': 1169228401, 'text': mapcss.tr(u'{0} is deprecated. Use the {1}: key prefix instead.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) # *[amenity=swimming_pool] if (u'amenity' in keys): @@ -2623,6 +2660,125 @@ def node(self, data, tags): u'amenity']) }}) + # *[building=true] + # *[building="*"] + # *[building=Y] + # *[building=y] + # *[building=1] + if (u'building' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'true')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'*')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'Y')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'y')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, 1)) + except mapcss.RuleAbort: pass + if match: + # group:tr("misspelled value") + # throwError:tr("{0}","{0.tag}") + # suggestAlternative:"building=yes" + # fixAdd:"building=yes" + err.append({'class': 9002018, 'subclass': 596818855, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'building',u'yes']]) + }}) + + # *[building=abandoned] + # *[building=address] + # *[building=bing] + # *[building=collapsed] + # *[building=damaged] + # *[building=demolished] + # *[building=disused] + # *[building=fixme] + # *[building=occupied] + # *[building=other] + # *[building=razed] + # *[building=unclassified] + # *[building=undefined] + # *[building=unknown] + # *[building=unidentified] + if (u'building' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'abandoned')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'address')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'bing')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'collapsed')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'damaged')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'demolished')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'disused')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'fixme')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'occupied')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'other')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'razed')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'unclassified')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'undefined')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'unknown')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'unidentified')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is not a building type.","{0.tag}") + err.append({'class': 9002001, 'subclass': 159699040, 'text': mapcss.tr(u'{0} is not a building type.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # node[power=transformer][location=pole][transformer] if (u'location' in keys and u'power' in keys and u'transformer' in keys): match = False @@ -3059,5670 +3215,8102 @@ def node(self, data, tags): u'kitchen_hours']) }}) - return err - - def way(self, data, tags, nds): - capture_tags = {} - keys = tags.keys() - err = [] - set_samecolor = False - - # *[barrier=wire_fence] - if (u'barrier' in keys): + # *[shop=money_transfer] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'wire_fence')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'money_transfer')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"barrier=fence + fence_type=chain_link" - # fixAdd:"barrier=fence" - # fixAdd:"fence_type=chain_link" - # assertNoMatch:"way barrier=fence" - # assertMatch:"way barrier=wire_fence" - err.append({'class': 9002001, 'subclass': 1107799632, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"amenity=money_transfer" + # fixChangeKey:"shop => amenity" + err.append({'class': 9002001, 'subclass': 1664997936, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'barrier',u'fence'], - [u'fence_type',u'chain_link']]) + [u'amenity', mapcss.tag(tags, u'shop')]]), + '-': ([ + u'shop']) }}) - # *[barrier=wood_fence] - if (u'barrier' in keys): + # *[contact:google_plus] + if (u'contact:google_plus' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'wood_fence')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'contact:google_plus')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"barrier=fence + fence_type=wood" - # fixAdd:"barrier=fence" - # fixAdd:"fence_type=wood" - err.append({'class': 9002001, 'subclass': 1412230714, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'barrier',u'fence'], - [u'fence_type',u'wood']]) + # throwWarning:tr("{0} is deprecated","{0.key}") + # fixRemove:"contact:google_plus" + err.append({'class': 9002001, 'subclass': 1869461154, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'contact:google_plus']) }}) - # way[highway=ford] - if (u'highway' in keys): + # *[amenity=garages] + # *[amenity=garage] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'ford')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'garages')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'garage')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") + # suggestAlternative:concat("building=","{0.value}") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"highway=* + ford=yes" - err.append({'class': 9002001, 'subclass': 591931361, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"amenity=parking + parking=garage_boxes" + # suggestAlternative:"landuse=garages" + err.append({'class': 9002001, 'subclass': 863228118, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # way[class] - if (u'class' in keys): + # *[shop=winery] + # *[amenity=winery] + if (u'amenity' in keys) or (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'class')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'winery')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"highway" - err.append({'class': 9002001, 'subclass': 905310794, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - - # *[highway=stile] - if (u'highway' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'stile')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'winery')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"barrier=stile" - # fixAdd:"barrier=stile" - # fixRemove:"highway" - err.append({'class': 9002001, 'subclass': 1435678043, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'barrier',u'stile']]), - '-': ([ - u'highway']) - }}) + # suggestAlternative:"craft=winery" + # suggestAlternative:"shop=wine" + err.append({'class': 9002001, 'subclass': 1773574987, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[highway=incline] - if (u'highway' in keys): + # *[amenity=youth_centre] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'incline')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'youth_centre')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"incline" - err.append({'class': 9002001, 'subclass': 765169083, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"amenity=community_centre + community_centre=youth_centre" + # fixAdd:"amenity=community_centre" + # fixAdd:"community_centre=youth_centre" + err.append({'class': 9002001, 'subclass': 1284929085, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'amenity',u'community_centre'], + [u'community_centre',u'youth_centre']]) + }}) - # *[highway=incline_steep] - if (u'highway' in keys): + # *[building:type][building=yes] + # *[building:type][!building] + if (u'building' in keys and u'building:type' in keys) or (u'building:type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'incline_steep')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building:type') and mapcss._tag_capture(capture_tags, 1, tags, u'building') == mapcss._value_capture(capture_tags, 1, u'yes')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"incline" - err.append({'class': 9002001, 'subclass': 1966772390, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[highway=unsurfaced] - if (u'highway' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'unsurfaced')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building:type') and not mapcss._tag_capture(capture_tags, 1, tags, u'building')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"highway=* + surface=unpaved" - # fixAdd:"highway=road" - # fixAdd:"surface=unpaved" - err.append({'class': 9002001, 'subclass': 20631498, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"building" + # fixChangeKey:"building:type => building" + err.append({'class': 9002001, 'subclass': 1927794430, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'highway',u'road'], - [u'surface',u'unpaved']]) + [u'building', mapcss.tag(tags, u'building:type')]]), + '-': ([ + u'building:type']) }}) - # *[landuse=wood] - if (u'landuse' in keys): + # *[building:type][building][building!=yes] + if (u'building' in keys and u'building:type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'wood')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building:type') and mapcss._tag_capture(capture_tags, 1, tags, u'building') and mapcss._tag_capture(capture_tags, 2, tags, u'building') != mapcss._value_const_capture(capture_tags, 2, u'yes', u'yes')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"landuse=forest" - # suggestAlternative:"natural=wood" - err.append({'class': 9002001, 'subclass': 469903103, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"building" + err.append({'class': 9002001, 'subclass': 1133239698, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[natural=marsh] - if (u'natural' in keys): + # *[escalator] + if (u'escalator' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'marsh')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'escalator')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"natural=wetland + wetland=marsh" - # fixAdd:"natural=wetland" - # fixAdd:"wetland=marsh" - err.append({'class': 9002001, 'subclass': 1459865523, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'natural',u'wetland'], - [u'wetland',u'marsh']]) - }}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"highway=steps + conveying=*" + err.append({'class': 9002001, 'subclass': 967271828, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[highway=byway] - if (u'highway' in keys): + # *[fenced] + if (u'fenced' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'byway')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fenced')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - err.append({'class': 9002001, 'subclass': 1844620979, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"barrier=fence" + err.append({'class': 9002001, 'subclass': 1141285220, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[power_source] - if (u'power_source' in keys): + # *[historic_name][!old_name] + if (u'historic_name' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power_source')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'historic_name') and not mapcss._tag_capture(capture_tags, 1, tags, u'old_name')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"generator:source" - err.append({'class': 9002001, 'subclass': 34751027, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # suggestAlternative:"old_name" + # fixChangeKey:"historic_name => old_name" + err.append({'class': 9002001, 'subclass': 1034538127, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'old_name', mapcss.tag(tags, u'historic_name')]]), + '-': ([ + u'historic_name']) + }}) - # *[power_rating] - if (u'power_rating' in keys): + # *[historic_name][old_name] + if (u'historic_name' in keys and u'old_name' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power_rating')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'historic_name') and mapcss._tag_capture(capture_tags, 1, tags, u'old_name')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"generator:output" - err.append({'class': 9002001, 'subclass': 904750343, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # suggestAlternative:"old_name" + err.append({'class': 9002001, 'subclass': 30762614, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[shop=antique] - if (u'shop' in keys): + # *[landuse=field] + if (u'landuse' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'antique')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'field')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=antiques" - # fixAdd:"shop=antiques" - err.append({'class': 9002001, 'subclass': 596668979, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"landuse=farmland" + # fixAdd:"landuse=farmland" + err.append({'class': 9002001, 'subclass': 426261497, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'shop',u'antiques']]) + [u'landuse',u'farmland']]) }}) - # *[shop=bags] - if (u'shop' in keys): + # *[leisure=beach] + if (u'leisure' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'bags')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'beach')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=bag" - # fixAdd:"shop=bag" - err.append({'class': 9002001, 'subclass': 1709003584, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'shop',u'bag']]) - }}) + # suggestAlternative:"leisure=beach_resort" + # suggestAlternative:"natural=beach" + err.append({'class': 9002001, 'subclass': 1767286055, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[shop=fashion] - if (u'shop' in keys): + # *[leisure=club] + if (u'leisure' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'fashion')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'club')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=clothes" - # fixAdd:"shop=clothes" - err.append({'class': 9002001, 'subclass': 985619804, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'shop',u'clothes']]) - }}) + # suggestAlternative:"club=*" + err.append({'class': 9002001, 'subclass': 1282397509, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[shop=organic] - if (u'shop' in keys): + # *[leisure=video_arcade] + if (u'leisure' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'organic')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'video_arcade')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=* + organic=only" - # suggestAlternative:"shop=* + organic=yes" - err.append({'class': 9002001, 'subclass': 1959365145, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"leisure=adult_gaming_centre" + # suggestAlternative:"leisure=amusement_arcade" + err.append({'class': 9002001, 'subclass': 1463909830, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[shop=pets] - if (u'shop' in keys): + # *[man_made=jetty] + if (u'man_made' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'pets')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'jetty')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=pet" - # fixAdd:"shop=pet" - err.append({'class': 9002001, 'subclass': 290270098, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"man_made=pier" + # fixAdd:"man_made=pier" + err.append({'class': 9002001, 'subclass': 192707176, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'shop',u'pet']]) + [u'man_made',u'pier']]) }}) - # *[shop=pharmacy] - if (u'shop' in keys): + # *[man_made=village_pump] + if (u'man_made' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'pharmacy')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'village_pump')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=pharmacy" - # fixChangeKey:"shop => amenity" - err.append({'class': 9002001, 'subclass': 350722657, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"man_made=water_well" + # fixAdd:"man_made=water_well" + err.append({'class': 9002001, 'subclass': 423232686, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'amenity', mapcss.tag(tags, u'shop')]]), - '-': ([ - u'shop']) + [u'man_made',u'water_well']]) }}) - # *[bicycle_parking=sheffield] - if (u'bicycle_parking' in keys): + # *[man_made=water_tank] + if (u'man_made' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bicycle_parking') == mapcss._value_capture(capture_tags, 0, u'sheffield')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'water_tank')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"bicycle_parking=stands" - # fixAdd:"bicycle_parking=stands" - err.append({'class': 9002001, 'subclass': 718874663, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"man_made=storage_tank + content=water" + # fixAdd:"content=water" + # fixAdd:"man_made=storage_tank" + err.append({'class': 9002001, 'subclass': 563629665, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'bicycle_parking',u'stands']]) + [u'content',u'water'], + [u'man_made',u'storage_tank']]) }}) - # *[amenity=emergency_phone] - if (u'amenity' in keys): + # *[natural=moor] + if (u'natural' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'emergency_phone')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'moor')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"emergency=phone" - # fixRemove:"amenity" - # fixAdd:"emergency=phone" - err.append({'class': 9002001, 'subclass': 1108230656, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'emergency',u'phone']]), - '-': ([ - u'amenity']) - }}) + # suggestAlternative:"landuse=meadow + meadow=agricultural" + # suggestAlternative:"natural=fell" + # suggestAlternative:"natural=grassland" + # suggestAlternative:"natural=heath" + # suggestAlternative:"natural=scrub" + # suggestAlternative:"natural=tundra" + # suggestAlternative:"natural=wetland" + err.append({'class': 9002001, 'subclass': 374637717, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[sport=gaelic_football] - if (u'sport' in keys): + # *[noexit=no][!fixme] + if (u'noexit' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'gaelic_football')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'noexit') == mapcss._value_capture(capture_tags, 0, u'no') and not mapcss._tag_capture(capture_tags, 1, tags, u'fixme')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"sport=gaelic_games" - # fixAdd:"sport=gaelic_games" - err.append({'class': 9002001, 'subclass': 1768681881, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"fixme=continue" + # fixAdd:"fixme=continue" + # fixRemove:"noexit" + err.append({'class': 9002001, 'subclass': 647435126, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'sport',u'gaelic_games']]) + [u'fixme',u'continue']]), + '-': ([ + u'noexit']) }}) - # *[power=station] - if (u'power' in keys): + # *[noexit=no][fixme] + if (u'fixme' in keys and u'noexit' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'station')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'noexit') == mapcss._value_capture(capture_tags, 0, u'no') and mapcss._tag_capture(capture_tags, 1, tags, u'fixme')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"power=plant" - # suggestAlternative:"power=substation" - err.append({'class': 9002001, 'subclass': 52025933, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"fixme=continue" + err.append({'class': 9002001, 'subclass': 881828009, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[power=sub_station] - if (u'power' in keys): + # *[shop=dive] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'sub_station')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'dive')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"power=substation" - # fixAdd:"power=substation" - err.append({'class': 9002001, 'subclass': 1423074682, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"shop=scuba_diving" + # fixAdd:"shop=scuba_diving" + err.append({'class': 9002001, 'subclass': 1582968978, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'power',u'substation']]) + [u'shop',u'scuba_diving']]) }}) - # *[generator:method=dam] - if (u'generator:method' in keys): + # *[shop=furnace] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') == mapcss._value_capture(capture_tags, 0, u'dam')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'furnace')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"generator:method=water-storage" - # fixAdd:"generator:method=water-storage" - err.append({'class': 9002001, 'subclass': 248819368, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'generator:method',u'water-storage']]) - }}) + # suggestAlternative:"craft=plumber" + # suggestAlternative:"shop=fireplace" + err.append({'class': 9002001, 'subclass': 1155821104, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[generator:method=pumped-storage] - if (u'generator:method' in keys): + # *[sport=paragliding] + if (u'sport' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') == mapcss._value_capture(capture_tags, 0, u'pumped-storage')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'paragliding')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"generator:method=water-pumped-storage" - # fixAdd:"generator:method=water-pumped-storage" - err.append({'class': 9002001, 'subclass': 93454158, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"sport=free_flying" + # fixAdd:"sport=free_flying" + err.append({'class': 9002001, 'subclass': 1531788430, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'generator:method',u'water-pumped-storage']]) + [u'sport',u'free_flying']]) }}) - # *[generator:method=pumping] - if (u'generator:method' in keys): + # *[tourism=bed_and_breakfast] + if (u'tourism' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') == mapcss._value_capture(capture_tags, 0, u'pumping')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tourism') == mapcss._value_capture(capture_tags, 0, u'bed_and_breakfast')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"generator:method=water-pumped-storage" - # fixAdd:"generator:method=water-pumped-storage" - err.append({'class': 9002001, 'subclass': 2115673716, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"tourism=guest_house + guest_house=bed_and_breakfast" + # fixAdd:"guest_house=bed_and_breakfast" + # fixAdd:"tourism=guest_house" + err.append({'class': 9002001, 'subclass': 954237438, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'generator:method',u'water-pumped-storage']]) + [u'guest_house',u'bed_and_breakfast'], + [u'tourism',u'guest_house']]) }}) - # *[fence_type=chain] - if (u'fence_type' in keys): + # *[diaper=yes] + # *[diaper=no] + if (u'diaper' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fence_type') == mapcss._value_capture(capture_tags, 0, u'chain')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"barrier=chain" - # suggestAlternative:"barrier=fence + fence_type=chain_link" - err.append({'class': 9002001, 'subclass': 19409288, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[building=entrance] - if (u'building' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'entrance')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper') == mapcss._value_capture(capture_tags, 0, u'no')) except mapcss.RuleAbort: pass if match: + # setdiaper_checked # group:tr("deprecated tagging") + # suggestAlternative:concat("changing_table=","{0.value}") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"entrance" - err.append({'class': 9002001, 'subclass': 306662985, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # fixChangeKey:"diaper => changing_table" + set_diaper_checked = True + err.append({'class': 9002001, 'subclass': 1957125311, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'changing_table', mapcss.tag(tags, u'diaper')]]), + '-': ([ + u'diaper']) + }}) - # *[board_type=board] - if (u'board_type' in keys): + # *[diaper][diaper=~/^[1-9][0-9]*$/] + if (u'diaper' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'board_type') == mapcss._value_capture(capture_tags, 0, u'board')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_0f294fdf), mapcss._tag_capture(capture_tags, 1, tags, u'diaper'))) except mapcss.RuleAbort: pass if match: + # setdiaper_checked # group:tr("deprecated tagging") + # suggestAlternative:concat("changing_table=yes + changing_table:count=","{0.value}") # throwWarning:tr("{0} is deprecated","{0.tag}") - # fixRemove:"board_type" - err.append({'class': 9002001, 'subclass': 1150949316, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # fixAdd:"changing_table=yes" + # fixChangeKey:"diaper => changing_table:count" + set_diaper_checked = True + err.append({'class': 9002001, 'subclass': 2105051472, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'changing_table',u'yes'], + [u'changing_table:count', mapcss.tag(tags, u'diaper')]]), '-': ([ - u'board_type']) + u'diaper']) }}) - # *[man_made=measurement_station] - if (u'man_made' in keys): + # *[diaper=room] + if (u'diaper' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'measurement_station')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper') == mapcss._value_capture(capture_tags, 0, u'room')) except mapcss.RuleAbort: pass if match: + # setdiaper_checked # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"man_made=monitoring_station" - # fixAdd:"man_made=monitoring_station" - err.append({'class': 9002001, 'subclass': 700465123, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'man_made',u'monitoring_station']]) - }}) + # suggestAlternative:"changing_table=dedicated_room" + # suggestAlternative:"changing_table=room" + set_diaper_checked = True + err.append({'class': 9002001, 'subclass': 883202329, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[measurement=water_level] - if (u'measurement' in keys): + # *[diaper]!.diaper_checked + if (u'diaper' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'measurement') == mapcss._value_capture(capture_tags, 0, u'water_level')) + try: match = (not set_diaper_checked and mapcss._tag_capture(capture_tags, 0, tags, u'diaper')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"monitoring:water_level=yes" - # fixRemove:"measurement" - # fixAdd:"monitoring:water_level=yes" - err.append({'class': 9002001, 'subclass': 634647702, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'monitoring:water_level',u'yes']]), - '-': ([ - u'measurement']) - }}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"changing_table" + err.append({'class': 9002001, 'subclass': 693675339, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[measurement=weather] - if (u'measurement' in keys): + # *[diaper:male=yes] + if (u'diaper:male' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'measurement') == mapcss._value_capture(capture_tags, 0, u'weather')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:male') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if match: + # setdiaper___checked # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"monitoring:weather=yes" - # fixRemove:"measurement" - # fixAdd:"monitoring:weather=yes" - err.append({'class': 9002001, 'subclass': 336627227, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"changing_table:location=male_toilet" + # fixAdd:"changing_table:location=male_toilet" + # fixRemove:"diaper:male" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 799035479, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'monitoring:weather',u'yes']]), + [u'changing_table:location',u'male_toilet']]), '-': ([ - u'measurement']) + u'diaper:male']) }}) - # *[measurement=seismic] - if (u'measurement' in keys): + # *[diaper:female=yes] + if (u'diaper:female' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'measurement') == mapcss._value_capture(capture_tags, 0, u'seismic')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:female') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if match: + # setdiaper___checked # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"monitoring:seismic_activity=yes" - # fixRemove:"measurement" - # fixAdd:"monitoring:seismic_activity=yes" - err.append({'class': 9002001, 'subclass': 1402131289, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"changing_table:location=female_toilet" + # fixAdd:"changing_table:location=female_toilet" + # fixRemove:"diaper:female" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 1450901137, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'monitoring:seismic_activity',u'yes']]), + [u'changing_table:location',u'female_toilet']]), '-': ([ - u'measurement']) + u'diaper:female']) }}) - # *[monitoring:river_level] - if (u'monitoring:river_level' in keys): + # *[diaper:unisex=yes] + if (u'diaper:unisex' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'monitoring:river_level')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:unisex') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if match: + # setdiaper___checked # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"monitoring:water_level" - # fixChangeKey:"monitoring:river_level => monitoring:water_level" - err.append({'class': 9002001, 'subclass': 264907924, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"changing_table:location=unisex_toilet" + # fixAdd:"changing_table:location=unisex_toilet" + # fixRemove:"diaper:unisex" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 1460378712, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'monitoring:water_level', mapcss.tag(tags, u'monitoring:river_level')]]), + [u'changing_table:location',u'unisex_toilet']]), '-': ([ - u'monitoring:river_level']) + u'diaper:unisex']) }}) - # *[stay] - if (u'stay' in keys): + # *[diaper:wheelchair=yes] + # *[diaper:wheelchair=no] + if (u'diaper:wheelchair' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'stay')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:wheelchair') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:wheelchair') == mapcss._value_capture(capture_tags, 0, u'no')) except mapcss.RuleAbort: pass if match: + # setdiaper___checked # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"maxstay" - # fixChangeKey:"stay => maxstay" - err.append({'class': 9002001, 'subclass': 787370129, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:concat("changing_table:wheelchair=","{0.value}") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # fixChangeKey:"diaper:wheelchair => changing_table:wheelchair" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 1951967281, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'maxstay', mapcss.tag(tags, u'stay')]]), + [u'changing_table:wheelchair', mapcss.tag(tags, u'diaper:wheelchair')]]), '-': ([ - u'stay']) + u'diaper:wheelchair']) }}) - # *[emergency=aed] - if (u'emergency' in keys): + # *[diaper:fee=yes] + # *[diaper:fee=no] + if (u'diaper:fee' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'emergency') == mapcss._value_capture(capture_tags, 0, u'aed')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:fee') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:fee') == mapcss._value_capture(capture_tags, 0, u'no')) except mapcss.RuleAbort: pass if match: + # setdiaper___checked # group:tr("deprecated tagging") + # suggestAlternative:concat("changing_table:fee=","{0.value}") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"emergency=defibrillator" - # fixAdd:"emergency=defibrillator" - err.append({'class': 9002001, 'subclass': 707111885, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # fixChangeKey:"diaper:fee => changing_table:fee" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 2008573526, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'emergency',u'defibrillator']]) + [u'changing_table:fee', mapcss.tag(tags, u'diaper:fee')]]), + '-': ([ + u'diaper:fee']) }}) - # *[day_on][!restriction] - # *[day_off][!restriction] - # *[date_on][!restriction] - # *[date_off][!restriction] - # *[hour_on][!restriction] - # *[hour_off][!restriction] - if (u'date_off' in keys) or (u'date_on' in keys) or (u'day_off' in keys) or (u'day_on' in keys) or (u'hour_off' in keys) or (u'hour_on' in keys): + # *[/^diaper:/]!.diaper___checked + if True: match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'day_on') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'day_off') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'date_on') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) + try: match = (not set_diaper___checked and mapcss._tag_capture(capture_tags, 0, tags, self.re_6029fe03)) except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","diaper:*") + # suggestAlternative:"changing_table:*" + err.append({'class': 9002001, 'subclass': 26578864, 'text': mapcss.tr(u'{0} is deprecated', u'diaper:*')}) + + # *[changing_table][changing_table!~/^(yes|no|limited)$/] + if (u'changing_table' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'date_off') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'changing_table') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_787405b1, u'^(yes|no|limited)$'), mapcss._tag_capture(capture_tags, 1, tags, u'changing_table'))) except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("wrong value: {0}","{0.tag}") + # suggestAlternative:"changing_table=limited" + # suggestAlternative:"changing_table=no" + # suggestAlternative:"changing_table=yes" + err.append({'class': 9002019, 'subclass': 1965225408, 'text': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[roof:shape=half_hipped] + if (u'roof:shape' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'hour_on') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'roof:shape') == mapcss._value_capture(capture_tags, 0, u'half_hipped')) except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"roof:shape=half-hipped" + # fixAdd:"roof:shape=half-hipped" + err.append({'class': 9002001, 'subclass': 1548347123, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'roof:shape',u'half-hipped']]) + }}) + + # *[bridge_name] + if (u'bridge_name' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'hour_off') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge_name')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"*:conditional" - err.append({'class': 9002001, 'subclass': 294264920, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # suggestAlternative:"bridge:name" + # fixChangeKey:"bridge_name => bridge:name" + err.append({'class': 9002001, 'subclass': 80069399, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'bridge:name', mapcss.tag(tags, u'bridge_name')]]), + '-': ([ + u'bridge_name']) + }}) - # *[access=designated] + # *[access=public] if (u'access' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'designated')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'public')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("''{0}'' is meaningless, use more specific tags, e.g. ''{1}''","access=designated","bicycle=designated") - # assertMatch:"way access=designated" - err.append({'class': 9002002, 'subclass': 2057594338, 'text': mapcss.tr(u'\'\'{0}\'\' is meaningless, use more specific tags, e.g. \'\'{1}\'\'', u'access=designated', u'bicycle=designated')}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"access=yes" + # fixAdd:"access=yes" + err.append({'class': 9002001, 'subclass': 1115157097, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'access',u'yes']]) + }}) - # *[access=official] - if (u'access' in keys): + # *[crossing=island] + if (u'crossing' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'official')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'crossing') == mapcss._value_capture(capture_tags, 0, u'island')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("''{0}'' does not specify the official mode of transportation, use ''{1}'' for example","access=official","bicycle=official") - # assertMatch:"way access=official" - err.append({'class': 9002003, 'subclass': 1909133836, 'text': mapcss.tr(u'\'\'{0}\'\' does not specify the official mode of transportation, use \'\'{1}\'\' for example', u'access=official', u'bicycle=official')}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"crossing:island=yes" + # fixRemove:"crossing" + # fixAdd:"crossing:island=yes" + err.append({'class': 9002001, 'subclass': 1512561318, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'crossing:island',u'yes']]), + '-': ([ + u'crossing']) + }}) - # *[fixme=yes] - # *[FIXME=yes] - if (u'FIXME' in keys) or (u'fixme' in keys): + return err + + def way(self, data, tags, nds): + capture_tags = {} + keys = tags.keys() + err = [] + set_diaper___checked = set_diaper_checked = set_samecolor = False + + # *[barrier=wire_fence] + if (u'barrier' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fixme') == mapcss._value_capture(capture_tags, 0, u'yes')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'FIXME') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'wire_fence')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0}={1} is unspecific. Instead of ''{1}'' please give more information about what exactly should be fixed.","{0.key}","{0.value}") - # assertMatch:"way fixme=yes" - err.append({'class': 9002004, 'subclass': 136657482, 'text': mapcss.tr(u'{0}={1} is unspecific. Instead of \'\'{1}\'\' please give more information about what exactly should be fixed.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"barrier=fence + fence_type=chain_link" + # fixAdd:"barrier=fence" + # fixAdd:"fence_type=chain_link" + # assertNoMatch:"way barrier=fence" + # assertMatch:"way barrier=wire_fence" + err.append({'class': 9002001, 'subclass': 1107799632, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'barrier',u'fence'], + [u'fence_type',u'chain_link']]) + }}) - # *[name][name=~/^(?i)fixme$/] - if (u'name' in keys): + # *[barrier=wood_fence] + if (u'barrier' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_1f92073a), mapcss._tag_capture(capture_tags, 1, tags, u'name'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'wood_fence')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("Wrong usage of {0} tag. Remove {1}, because it is clear that the name is missing even without an additional tag.","{0.key}","{0.tag}") - # fixRemove:"name" - err.append({'class': 9002005, 'subclass': 642340557, 'text': mapcss.tr(u'Wrong usage of {0} tag. Remove {1}, because it is clear that the name is missing even without an additional tag.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '-': ([ - u'name']) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"barrier=fence + fence_type=wood" + # fixAdd:"barrier=fence" + # fixAdd:"fence_type=wood" + err.append({'class': 9002001, 'subclass': 1412230714, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'barrier',u'fence'], + [u'fence_type',u'wood']]) }}) - # *[note][note=~/^(?i)fixme$/] - if (u'note' in keys): + # way[highway=ford] + if (u'highway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'note') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_1f92073a), mapcss._tag_capture(capture_tags, 1, tags, u'note'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'ford')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0} is unspecific. Instead use the key fixme with the information what exactly should be fixed in the value of fixme.","{0.tag}") - err.append({'class': 9002006, 'subclass': 1243120287, 'text': mapcss.tr(u'{0} is unspecific. Instead use the key fixme with the information what exactly should be fixed in the value of fixme.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"highway=* + ford=yes" + err.append({'class': 9002001, 'subclass': 591931361, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[type=broad_leaved] - # *[type=broad_leafed] - if (u'type' in keys): + # way[class] + if (u'class' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'broad_leaved')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'class')) except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"highway" + err.append({'class': 9002001, 'subclass': 905310794, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[highway=stile] + if (u'highway' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'broad_leafed')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'stile')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leaf_type=broadleaved" - # fixAdd:"leaf_type=broadleaved" - # fixRemove:"{0.key}" - err.append({'class': 9002001, 'subclass': 293968062, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"barrier=stile" + # fixAdd:"barrier=stile" + # fixRemove:"highway" + err.append({'class': 9002001, 'subclass': 1435678043, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'leaf_type',u'broadleaved']]), + [u'barrier',u'stile']]), '-': ([ - mapcss._tag_uncapture(capture_tags, u'{0.key}')]) + u'highway']) }}) - # *[wood=coniferous] - # *[type=coniferous] - # *[type=conifer] - if (u'type' in keys) or (u'wood' in keys): + # *[highway=incline] + if (u'highway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'coniferous')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'coniferous')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'conifer')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'incline')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leaf_type=needleleaved" - # fixAdd:"leaf_type=needleleaved" - # fixRemove:"{0.key}" - err.append({'class': 9002001, 'subclass': 50517650, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'leaf_type',u'needleleaved']]), - '-': ([ - mapcss._tag_uncapture(capture_tags, u'{0.key}')]) - }}) + # suggestAlternative:"incline" + err.append({'class': 9002001, 'subclass': 765169083, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[wood=mixed] - if (u'wood' in keys): + # *[highway=incline_steep] + if (u'highway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'mixed')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'incline_steep')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leaf_type=mixed" - # fixAdd:"leaf_type=mixed" - # fixRemove:"wood" - err.append({'class': 9002001, 'subclass': 235914603, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'leaf_type',u'mixed']]), - '-': ([ - u'wood']) - }}) + # suggestAlternative:"incline" + err.append({'class': 9002001, 'subclass': 1966772390, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[wood=evergreen] - # *[type=evergreen] - if (u'type' in keys) or (u'wood' in keys): + # *[highway=unsurfaced] + if (u'highway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'evergreen')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'evergreen')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'unsurfaced')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leaf_cycle=evergreen" - # fixAdd:"leaf_cycle=evergreen" - # fixRemove:"{0.key}" - err.append({'class': 9002001, 'subclass': 747964532, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"highway=* + surface=unpaved" + # fixAdd:"highway=road" + # fixAdd:"surface=unpaved" + err.append({'class': 9002001, 'subclass': 20631498, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'leaf_cycle',u'evergreen']]), - '-': ([ - mapcss._tag_uncapture(capture_tags, u'{0.key}')]) + [u'highway',u'road'], + [u'surface',u'unpaved']]) }}) - # *[type=deciduous] - # *[type=deciduos] - if (u'type' in keys): + # *[landuse=wood] + if (u'landuse' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'deciduous')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'deciduos')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'wood')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leaf_cycle=deciduous" - # fixAdd:"leaf_cycle=deciduous" - # fixRemove:"type" - err.append({'class': 9002001, 'subclass': 591116099, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'leaf_cycle',u'deciduous']]), - '-': ([ - u'type']) - }}) + # suggestAlternative:"landuse=forest" + # suggestAlternative:"natural=wood" + err.append({'class': 9002001, 'subclass': 469903103, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[wood=deciduous] - if (u'wood' in keys): + # *[natural=marsh] + if (u'natural' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'deciduous')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'marsh')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leaf_type + leaf_cycle" - err.append({'class': 9002001, 'subclass': 1100223594, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"natural=wetland + wetland=marsh" + # fixAdd:"natural=wetland" + # fixAdd:"wetland=marsh" + err.append({'class': 9002001, 'subclass': 1459865523, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'natural',u'wetland'], + [u'wetland',u'marsh']]) + }}) - # way[type=palm] - if (u'type' in keys): + # *[highway=byway] + if (u'highway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'palm')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'byway')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leaf_type" - # suggestAlternative:"species" - # suggestAlternative:"trees" - err.append({'class': 9002001, 'subclass': 1757132153, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + err.append({'class': 9002001, 'subclass': 1844620979, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[natural=land] - if (u'natural' in keys): + # *[power_source] + if (u'power_source' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'land')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power_source')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated. Please use instead a multipolygon.","{0.tag}") - # assertMatch:"way natural=land" - err.append({'class': 9002001, 'subclass': 94558529, 'text': mapcss.tr(u'{0} is deprecated. Please use instead a multipolygon.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"generator:source" + err.append({'class': 9002001, 'subclass': 34751027, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[bridge=causeway] - if (u'bridge' in keys): + # *[power_rating] + if (u'power_rating' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'causeway')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power_rating')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"bridge=low_water_crossing" - # suggestAlternative:"embankment=yes" - # suggestAlternative:"ford=yes" - err.append({'class': 9002001, 'subclass': 461671124, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"generator:output" + err.append({'class': 9002001, 'subclass': 904750343, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[bridge=swing] - if (u'bridge' in keys): + # *[shop=antique] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'swing')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'antique')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"bridge:movable=swing" - # suggestAlternative:"bridge:structure=simple-suspension" - err.append({'class': 9002001, 'subclass': 1047428067, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"shop=antiques" + # fixAdd:"shop=antiques" + err.append({'class': 9002001, 'subclass': 596668979, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop',u'antiques']]) + }}) - # *[bridge=suspension] - if (u'bridge' in keys): + # *[shop=bags] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'suspension')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'bags')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"bridge=yes + bridge:structure=suspension" - # fixAdd:"bridge:structure=suspension" - # fixAdd:"bridge=yes" - err.append({'class': 9002001, 'subclass': 1157046268, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"shop=bag" + # fixAdd:"shop=bag" + err.append({'class': 9002001, 'subclass': 1709003584, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'bridge:structure',u'suspension'], - [u'bridge',u'yes']]) + [u'shop',u'bag']]) }}) - # *[fee=interval] - # *[lit=interval] - # *[supervised=interval] - if (u'fee' in keys) or (u'lit' in keys) or (u'supervised' in keys): + # *[shop=fashion] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fee') == mapcss._value_capture(capture_tags, 0, u'interval')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'lit') == mapcss._value_capture(capture_tags, 0, u'interval')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'supervised') == mapcss._value_capture(capture_tags, 0, u'interval')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'fashion')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated. Please specify interval by using opening_hours syntax","{0.tag}") - err.append({'class': 9002001, 'subclass': 417886592, 'text': mapcss.tr(u'{0} is deprecated. Please specify interval by using opening_hours syntax', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=clothes" + # fixAdd:"shop=clothes" + err.append({'class': 9002001, 'subclass': 985619804, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop',u'clothes']]) + }}) - # *[/josm\/ignore/] - if True: + # *[shop=organic] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_5ee0acf2)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'organic')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwError:tr("{0} is deprecated. Please delete this object and use a private layer instead","{0.key}") - # fixDeleteObject:this - err.append({'class': 9002001, 'subclass': 1402743016, 'text': mapcss.tr(u'{0} is deprecated. Please delete this object and use a private layer instead', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=* + organic=only" + # suggestAlternative:"shop=* + organic=yes" + err.append({'class': 9002001, 'subclass': 1959365145, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[sport=diving] - if (u'sport' in keys): + # *[shop=pets] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'diving')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'pets')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"sport=cliff_diving" - # suggestAlternative:"sport=scuba_diving" - err.append({'class': 9002001, 'subclass': 590643159, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"shop=pet" + # fixAdd:"shop=pet" + err.append({'class': 9002001, 'subclass': 290270098, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop',u'pet']]) + }}) - # *[parking=park_and_ride] - if (u'parking' in keys): + # *[shop=pharmacy] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'parking') == mapcss._value_capture(capture_tags, 0, u'park_and_ride')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'pharmacy')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=parking + park_ride=yes" - # fixAdd:"amenity=parking" - # fixAdd:"park_ride=yes" - # fixRemove:"parking" - err.append({'class': 9002001, 'subclass': 1893516041, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"amenity=pharmacy" + # fixChangeKey:"shop => amenity" + err.append({'class': 9002001, 'subclass': 350722657, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'amenity',u'parking'], - [u'park_ride',u'yes']]), + [u'amenity', mapcss.tag(tags, u'shop')]]), '-': ([ - u'parking']) + u'shop']) }}) - # *[traffic_calming=yes] - # *[access=restricted] - # *[barrier=yes] - # *[aerialway=yes][!public_transport] - # *[amenity=yes] - # *[leisure=yes] - # *[shop="*"] - # *[shop=yes][amenity!=fuel] - # *[craft=yes] - # *[service=yes] - # *[place=yes] - if (u'access' in keys) or (u'aerialway' in keys) or (u'amenity' in keys) or (u'barrier' in keys) or (u'craft' in keys) or (u'leisure' in keys) or (u'place' in keys) or (u'service' in keys) or (u'shop' in keys) or (u'traffic_calming' in keys): + # *[bicycle_parking=sheffield] + if (u'bicycle_parking' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'traffic_calming') == mapcss._value_capture(capture_tags, 0, u'yes')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'restricted')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'yes')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aerialway') == mapcss._value_capture(capture_tags, 0, u'yes') and not mapcss._tag_capture(capture_tags, 1, tags, u'public_transport')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'yes')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'yes')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'*')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'yes') and mapcss._tag_capture(capture_tags, 1, tags, u'amenity') != mapcss._value_const_capture(capture_tags, 1, u'fuel', u'fuel')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'craft') == mapcss._value_capture(capture_tags, 0, u'yes')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'service') == mapcss._value_capture(capture_tags, 0, u'yes')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bicycle_parking') == mapcss._value_capture(capture_tags, 0, u'sheffield')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0}={1} is unspecific. Please replace ''{1}'' by a specific value.","{0.key}","{0.value}") - err.append({'class': 9002007, 'subclass': 962298405, 'text': mapcss.tr(u'{0}={1} is unspecific. Please replace \'\'{1}\'\' by a specific value.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"bicycle_parking=stands" + # fixAdd:"bicycle_parking=stands" + err.append({'class': 9002001, 'subclass': 718874663, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'bicycle_parking',u'stands']]) + }}) - # *[place_name][!name] - if (u'place_name' in keys): + # *[amenity=emergency_phone] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place_name') and not mapcss._tag_capture(capture_tags, 1, tags, u'name')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'emergency_phone')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0} should be replaced with {1}","{0.key}","{1.key}") - # fixChangeKey:"place_name => name" - err.append({'class': 9002008, 'subclass': 1089331760, 'text': mapcss.tr(u'{0} should be replaced with {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}')), 'allow_fix_override': True, 'fix': { + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"emergency=phone" + # fixRemove:"amenity" + # fixAdd:"emergency=phone" + err.append({'class': 9002001, 'subclass': 1108230656, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'name', mapcss.tag(tags, u'place_name')]]), + [u'emergency',u'phone']]), '-': ([ - u'place_name']) + u'amenity']) }}) - # *[place][place_name=*name] - if (u'place' in keys and u'place_name' in keys): + # *[sport=gaelic_football] + if (u'sport' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place') and mapcss._tag_capture(capture_tags, 1, tags, u'place_name') == mapcss._value_capture(capture_tags, 1, mapcss.tag(tags, u'name'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'gaelic_football')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0} = {1}; remove {0}","{1.key}","{1.value}") - # fixRemove:"{1.key}" - err.append({'class': 9002009, 'subclass': 1116761280, 'text': mapcss.tr(u'{0} = {1}; remove {0}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{1.value}')), 'allow_fix_override': True, 'fix': { - '-': ([ - mapcss._tag_uncapture(capture_tags, u'{1.key}')]) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"sport=gaelic_games" + # fixAdd:"sport=gaelic_games" + err.append({'class': 9002001, 'subclass': 1768681881, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'sport',u'gaelic_games']]) }}) - # way[sidewalk=yes] - if (u'sidewalk' in keys): + # *[power=station] + if (u'power' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sidewalk') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'station')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0}={1} is unspecific. Please replace ''{1}'' by ''left'', ''right'' or ''both''.","{0.key}","{0.value}") - err.append({'class': 9002015, 'subclass': 36539821, 'text': mapcss.tr(u'{0}={1} is unspecific. Please replace \'\'{1}\'\' by \'\'left\'\', \'\'right\'\' or \'\'both\'\'.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"power=plant" + # suggestAlternative:"power=substation" + err.append({'class': 9002001, 'subclass': 52025933, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[waterway=water_point] - if (u'waterway' in keys): + # *[power=sub_station] + if (u'power' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'water_point')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'sub_station')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=water_point" - # fixChangeKey:"waterway => amenity" - err.append({'class': 9002001, 'subclass': 103347605, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"power=substation" + # fixAdd:"power=substation" + err.append({'class': 9002001, 'subclass': 1423074682, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'amenity', mapcss.tag(tags, u'waterway')]]), - '-': ([ - u'waterway']) + [u'power',u'substation']]) }}) - # *[waterway=waste_disposal] - if (u'waterway' in keys): + # *[generator:method=dam] + if (u'generator:method' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'waste_disposal')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') == mapcss._value_capture(capture_tags, 0, u'dam')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=waste_disposal" - # fixChangeKey:"waterway => amenity" - err.append({'class': 9002001, 'subclass': 1963461348, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"generator:method=water-storage" + # fixAdd:"generator:method=water-storage" + err.append({'class': 9002001, 'subclass': 248819368, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'amenity', mapcss.tag(tags, u'waterway')]]), - '-': ([ - u'waterway']) + [u'generator:method',u'water-storage']]) }}) - # *[waterway=mooring] - if (u'waterway' in keys): + # *[generator:method=pumped-storage] + if (u'generator:method' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'mooring')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') == mapcss._value_capture(capture_tags, 0, u'pumped-storage')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"mooring=yes" - # fixAdd:"mooring=yes" - # fixRemove:"waterway" - err.append({'class': 9002001, 'subclass': 81358738, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"generator:method=water-pumped-storage" + # fixAdd:"generator:method=water-pumped-storage" + err.append({'class': 9002001, 'subclass': 93454158, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'mooring',u'yes']]), - '-': ([ - u'waterway']) + [u'generator:method',u'water-pumped-storage']]) }}) - # *[building][levels] - # *[building:part=yes][levels] - if (u'building' in keys and u'levels' in keys) or (u'building:part' in keys and u'levels' in keys): + # *[generator:method=pumping] + if (u'generator:method' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') and mapcss._tag_capture(capture_tags, 1, tags, u'levels')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building:part') == mapcss._value_capture(capture_tags, 0, u'yes') and mapcss._tag_capture(capture_tags, 1, tags, u'levels')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') == mapcss._value_capture(capture_tags, 0, u'pumping')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{1.key}") - # suggestAlternative:"building:levels" - # fixChangeKey:"levels => building:levels" - err.append({'class': 9002001, 'subclass': 293177436, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{1.key}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"generator:method=water-pumped-storage" + # fixAdd:"generator:method=water-pumped-storage" + err.append({'class': 9002001, 'subclass': 2115673716, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'building:levels', mapcss.tag(tags, u'levels')]]), - '-': ([ - u'levels']) + [u'generator:method',u'water-pumped-storage']]) }}) - # *[protected_class] - if (u'protected_class' in keys): + # *[fence_type=chain] + if (u'fence_type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'protected_class')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fence_type') == mapcss._value_capture(capture_tags, 0, u'chain')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"protect_class" - # fixChangeKey:"protected_class => protect_class" - err.append({'class': 9002001, 'subclass': 716999373, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'protect_class', mapcss.tag(tags, u'protected_class')]]), - '-': ([ - u'protected_class']) - }}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"barrier=chain" + # suggestAlternative:"barrier=fence + fence_type=chain_link" + err.append({'class': 9002001, 'subclass': 19409288, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[lock=unknown] - # *[hide=unknown] - # *[shelter=unknown] - # *[access=unknown] - # *[capacity:parent=unknown] - # *[capacity:women=unknown] - # *[capacity:disabled=unknown] - # *[crossing=unknown] - # *[foot=unknown] - if (u'access' in keys) or (u'capacity:disabled' in keys) or (u'capacity:parent' in keys) or (u'capacity:women' in keys) or (u'crossing' in keys) or (u'foot' in keys) or (u'hide' in keys) or (u'lock' in keys) or (u'shelter' in keys): + # *[building=entrance] + if (u'building' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'lock') == mapcss._value_capture(capture_tags, 0, u'unknown')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'hide') == mapcss._value_capture(capture_tags, 0, u'unknown')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shelter') == mapcss._value_capture(capture_tags, 0, u'unknown')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'unknown')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'capacity:parent') == mapcss._value_capture(capture_tags, 0, u'unknown')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'capacity:women') == mapcss._value_capture(capture_tags, 0, u'unknown')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'capacity:disabled') == mapcss._value_capture(capture_tags, 0, u'unknown')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'crossing') == mapcss._value_capture(capture_tags, 0, u'unknown')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'foot') == mapcss._value_capture(capture_tags, 0, u'unknown')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'entrance')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("Unspecific tag {0}","{0.tag}") - err.append({'class': 9002010, 'subclass': 1289257359, 'text': mapcss.tr(u'Unspecific tag {0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"entrance" + err.append({'class': 9002001, 'subclass': 306662985, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[sport=skiing] - if (u'sport' in keys): + # *[board_type=board] + if (u'board_type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'skiing')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'board_type') == mapcss._value_capture(capture_tags, 0, u'board')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("Definition of {0} is unclear","{0.tag}") - # suggestAlternative:tr("{0} + {1} + {2}","piste:type=*","piste:difficulty=*","piste:grooming=*") - err.append({'class': 9002001, 'subclass': 1578959559, 'text': mapcss.tr(u'Definition of {0} is unclear', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # fixRemove:"board_type" + err.append({'class': 9002001, 'subclass': 1150949316, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'board_type']) + }}) - # *[waterway=wadi] - if (u'waterway' in keys): + # *[man_made=measurement_station] + if (u'man_made' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'wadi')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'measurement_station')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"natural=valley" - # suggestAlternative:"{0.key}=* + intermittent=yes" - err.append({'class': 9002001, 'subclass': 719234223, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"man_made=monitoring_station" + # fixAdd:"man_made=monitoring_station" + err.append({'class': 9002001, 'subclass': 700465123, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'man_made',u'monitoring_station']]) + }}) - # way[oneway=1][!waterway] - if (u'oneway' in keys): + # *[measurement=water_level] + if (u'measurement' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'oneway') == mapcss._value_capture(capture_tags, 0, 1) and not mapcss._tag_capture(capture_tags, 1, tags, u'waterway')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'measurement') == mapcss._value_capture(capture_tags, 0, u'water_level')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"oneway=yes" - # fixAdd:"oneway=yes" - err.append({'class': 9002001, 'subclass': 430545008, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"monitoring:water_level=yes" + # fixRemove:"measurement" + # fixAdd:"monitoring:water_level=yes" + err.append({'class': 9002001, 'subclass': 634647702, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'oneway',u'yes']]) + [u'monitoring:water_level',u'yes']]), + '-': ([ + u'measurement']) }}) - # way[oneway=-1][!waterway] - if (u'oneway' in keys): + # *[measurement=weather] + if (u'measurement' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'oneway') == mapcss._value_capture(capture_tags, 0, -1) and not mapcss._tag_capture(capture_tags, 1, tags, u'waterway')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'measurement') == mapcss._value_capture(capture_tags, 0, u'weather')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0} is not recommended. Use the Reverse Ways function from the Tools menu.","{0.tag}") - err.append({'class': 9002016, 'subclass': 1448981670, 'text': mapcss.tr(u'{0} is not recommended. Use the Reverse Ways function from the Tools menu.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"monitoring:weather=yes" + # fixRemove:"measurement" + # fixAdd:"monitoring:weather=yes" + err.append({'class': 9002001, 'subclass': 336627227, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'monitoring:weather',u'yes']]), + '-': ([ + u'measurement']) + }}) - # *[drinkable] - if (u'drinkable' in keys): + # *[measurement=seismic] + if (u'measurement' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'drinkable')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'measurement') == mapcss._value_capture(capture_tags, 0, u'seismic')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"drinking_water" - err.append({'class': 9002001, 'subclass': 1785584789, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"monitoring:seismic_activity=yes" + # fixRemove:"measurement" + # fixAdd:"monitoring:seismic_activity=yes" + err.append({'class': 9002001, 'subclass': 1402131289, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'monitoring:seismic_activity',u'yes']]), + '-': ([ + u'measurement']) + }}) - # *[color][!colour] - if (u'color' in keys): + # *[monitoring:river_level] + if (u'monitoring:river_level' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'color') and not mapcss._tag_capture(capture_tags, 1, tags, u'colour')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'monitoring:river_level')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"colour" - # fixChangeKey:"color => colour" - # assertNoMatch:"way color=red colour=red" - # assertMatch:"way color=red" - err.append({'class': 9002001, 'subclass': 1850270072, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"monitoring:water_level" + # fixChangeKey:"monitoring:river_level => monitoring:water_level" + err.append({'class': 9002001, 'subclass': 264907924, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'colour', mapcss.tag(tags, u'color')]]), + [u'monitoring:water_level', mapcss.tag(tags, u'monitoring:river_level')]]), '-': ([ - u'color']) + u'monitoring:river_level']) }}) - # *[color][colour][color=*colour] - if (u'color' in keys and u'colour' in keys): + # *[stay] + if (u'stay' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'color') and mapcss._tag_capture(capture_tags, 1, tags, u'colour') and mapcss._tag_capture(capture_tags, 2, tags, u'color') == mapcss._value_capture(capture_tags, 2, mapcss.tag(tags, u'colour'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'stay')) except mapcss.RuleAbort: pass if match: - # setsamecolor # group:tr("deprecated tagging") - # throwWarning:tr("{0} together with {1}","{0.key}","{1.key}") - # suggestAlternative:"colour" - # fixRemove:"color" - # assertNoMatch:"way color=red colour=green" - # assertMatch:"way color=red colour=red" - set_samecolor = True - err.append({'class': 9002001, 'subclass': 1825345743, 'text': mapcss.tr(u'{0} together with {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"maxstay" + # fixChangeKey:"stay => maxstay" + err.append({'class': 9002001, 'subclass': 787370129, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'maxstay', mapcss.tag(tags, u'stay')]]), '-': ([ - u'color']) + u'stay']) }}) - # *[color][colour]!.samecolor - if (u'color' in keys and u'colour' in keys): + # *[emergency=aed] + if (u'emergency' in keys): match = False if not match: capture_tags = {} - try: match = (not set_samecolor and mapcss._tag_capture(capture_tags, 0, tags, u'color') and mapcss._tag_capture(capture_tags, 1, tags, u'colour')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'emergency') == mapcss._value_capture(capture_tags, 0, u'aed')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} together with {1} and conflicting values","{0.key}","{1.key}") - # suggestAlternative:"colour" - # assertMatch:"way color=red colour=green" - # assertNoMatch:"way color=red colour=red" - err.append({'class': 9002001, 'subclass': 1064658218, 'text': mapcss.tr(u'{0} together with {1} and conflicting values', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) - - # *[building:color][building:colour]!.samebuildingcolor - # Use undeclared class samebuildingcolor - - # *[roof:color][roof:colour]!.sameroofcolor - # Use undeclared class sameroofcolor + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"emergency=defibrillator" + # fixAdd:"emergency=defibrillator" + err.append({'class': 9002001, 'subclass': 707111885, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'emergency',u'defibrillator']]) + }}) - # *[/:color/][!building:color][!roof:color] - if True: + # *[day_on][!restriction] + # *[day_off][!restriction] + # *[date_on][!restriction] + # *[date_off][!restriction] + # *[hour_on][!restriction] + # *[hour_off][!restriction] + if (u'date_off' in keys) or (u'date_on' in keys) or (u'day_off' in keys) or (u'day_on' in keys) or (u'hour_off' in keys) or (u'hour_on' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_554de4c7) and not mapcss._tag_capture(capture_tags, 1, tags, u'building:color') and not mapcss._tag_capture(capture_tags, 2, tags, u'roof:color')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'day_on') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:":colour" - # assertNoMatch:"way color=red" - # assertMatch:"way cycleway:surface:color=grey" - # assertNoMatch:"way roof:color=grey" - err.append({'class': 9002001, 'subclass': 238251143, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - - # *[/color:/] - if True: - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_0c5b5730)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'day_off') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"colour:" - # assertMatch:"way color:back=grey" - # assertNoMatch:"way color=red" - err.append({'class': 9002001, 'subclass': 1390370717, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - - # *[/=|\+|\/|&|<|>|;|'|"|%|#|@|\\|,|\.|\{|\}|\?|\*|\^|\$/] - if True: - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_620f4d52)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'date_on') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) except mapcss.RuleAbort: pass - if match: - # group:tr("key with uncommon character") - # throwWarning:tr("{0}","{0.key}") - err.append({'class': 9002011, 'subclass': 1752615188, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - - # *[/^.$/] - # way[/^..$/] - if True: - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_27210286)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'date_off') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_34c15d62)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'hour_on') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'hour_off') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("uncommon short key") - # assertMatch:"way to=bar" - err.append({'class': 9002012, 'subclass': 73953777, 'text': mapcss.tr(u'uncommon short key')}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"*:conditional" + err.append({'class': 9002001, 'subclass': 294264920, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[sport=hockey] - if (u'sport' in keys): + # *[access=designated] + if (u'access' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'hockey')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'designated')) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"sport=field_hockey" - # suggestAlternative:"sport=ice_hockey" - err.append({'class': 9002001, 'subclass': 651933474, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("''{0}'' is meaningless, use more specific tags, e.g. ''{1}''","access=designated","bicycle=designated") + # assertMatch:"way access=designated" + err.append({'class': 9002002, 'subclass': 2057594338, 'text': mapcss.tr(u'\'\'{0}\'\' is meaningless, use more specific tags, e.g. \'\'{1}\'\'', u'access=designated', u'bicycle=designated')}) - # *[sport=billard] - # *[sport=billards] - # *[sport=billiard] - if (u'sport' in keys): + # *[access=official] + if (u'access' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'billard')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'official')) except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("''{0}'' does not specify the official mode of transportation, use ''{1}'' for example","access=official","bicycle=official") + # assertMatch:"way access=official" + err.append({'class': 9002003, 'subclass': 1909133836, 'text': mapcss.tr(u'\'\'{0}\'\' does not specify the official mode of transportation, use \'\'{1}\'\' for example', u'access=official', u'bicycle=official')}) + + # *[fixme=yes] + # *[FIXME=yes] + if (u'FIXME' in keys) or (u'fixme' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'billards')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fixme') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'billiard')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'FIXME') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"sport=billiards" - # fixAdd:"sport=billiards" - err.append({'class': 9002001, 'subclass': 1522897824, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'sport',u'billiards']]) - }}) + # throwWarning:tr("{0}={1} is unspecific. Instead of ''{1}'' please give more information about what exactly should be fixed.","{0.key}","{0.value}") + # assertMatch:"way fixme=yes" + err.append({'class': 9002004, 'subclass': 136657482, 'text': mapcss.tr(u'{0}={1} is unspecific. Instead of \'\'{1}\'\' please give more information about what exactly should be fixed.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) - # *[payment:credit_cards=yes] - if (u'payment:credit_cards' in keys): + # *[name][name=~/^(?i)fixme$/] + if (u'name' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:credit_cards') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_1f92073a), mapcss._tag_capture(capture_tags, 1, tags, u'name'))) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:mastercard=yes","payment:visa=yes") - err.append({'class': 9002013, 'subclass': 705181097, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:mastercard=yes', u'payment:visa=yes')}) + # throwWarning:tr("Wrong usage of {0} tag. Remove {1}, because it is clear that the name is missing even without an additional tag.","{0.key}","{0.tag}") + # fixRemove:"name" + err.append({'class': 9002005, 'subclass': 642340557, 'text': mapcss.tr(u'Wrong usage of {0} tag. Remove {1}, because it is clear that the name is missing even without an additional tag.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'name']) + }}) - # *[payment:debit_cards=yes] - if (u'payment:debit_cards' in keys): + # *[note][note=~/^(?i)fixme$/] + if (u'note' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:debit_cards') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'note') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_1f92073a), mapcss._tag_capture(capture_tags, 1, tags, u'note'))) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:maestro=yes","payment:girocard=yes") - err.append({'class': 9002013, 'subclass': 679215558, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:maestro=yes', u'payment:girocard=yes')}) + # throwWarning:tr("{0} is unspecific. Instead use the key fixme with the information what exactly should be fixed in the value of fixme.","{0.tag}") + err.append({'class': 9002006, 'subclass': 1243120287, 'text': mapcss.tr(u'{0} is unspecific. Instead use the key fixme with the information what exactly should be fixed in the value of fixme.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[payment:electronic_purses=yes] - if (u'payment:electronic_purses' in keys): + # *[type=broad_leaved] + # *[type=broad_leafed] + if (u'type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:electronic_purses') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'broad_leaved')) except mapcss.RuleAbort: pass - if match: - # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:ep_geldkarte=yes","payment:ep_quick=yes") - err.append({'class': 9002013, 'subclass': 1440457244, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:ep_geldkarte=yes', u'payment:ep_quick=yes')}) - - # *[payment:cryptocurrencies=yes] - if (u'payment:cryptocurrencies' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:cryptocurrencies') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'broad_leafed')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:bitcoin=yes","payment:litecoin=yes") - err.append({'class': 9002013, 'subclass': 1325255949, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:bitcoin=yes', u'payment:litecoin=yes')}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leaf_type=broadleaved" + # fixAdd:"leaf_type=broadleaved" + # fixRemove:"{0.key}" + err.append({'class': 9002001, 'subclass': 293968062, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'leaf_type',u'broadleaved']]), + '-': ([ + mapcss._tag_uncapture(capture_tags, u'{0.key}')]) + }}) - # *[payment:ep_quick] - # *[payment:ep_cash] - # *[payment:ep_proton] - # *[payment:ep_chipknip] - if (u'payment:ep_cash' in keys) or (u'payment:ep_chipknip' in keys) or (u'payment:ep_proton' in keys) or (u'payment:ep_quick' in keys): + # *[wood=coniferous] + # *[type=coniferous] + # *[type=conifer] + if (u'type' in keys) or (u'wood' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_quick')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_cash')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'coniferous')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_proton')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'coniferous')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_chipknip')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'conifer')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leaf_type=needleleaved" + # fixAdd:"leaf_type=needleleaved" # fixRemove:"{0.key}" - err.append({'class': 9002001, 'subclass': 332575437, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + err.append({'class': 9002001, 'subclass': 50517650, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'leaf_type',u'needleleaved']]), '-': ([ mapcss._tag_uncapture(capture_tags, u'{0.key}')]) }}) - # *[kp][highway=milestone] - # *[kp][railway=milestone] - # *[kp][waterway=milestone] - if (u'highway' in keys and u'kp' in keys) or (u'kp' in keys and u'railway' in keys) or (u'kp' in keys and u'waterway' in keys): + # *[wood=mixed] + if (u'wood' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kp') and mapcss._tag_capture(capture_tags, 1, tags, u'highway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'mixed')) except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leaf_type=mixed" + # fixAdd:"leaf_type=mixed" + # fixRemove:"wood" + err.append({'class': 9002001, 'subclass': 235914603, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'leaf_type',u'mixed']]), + '-': ([ + u'wood']) + }}) + + # *[wood=evergreen] + # *[type=evergreen] + if (u'type' in keys) or (u'wood' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kp') and mapcss._tag_capture(capture_tags, 1, tags, u'railway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'evergreen')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kp') and mapcss._tag_capture(capture_tags, 1, tags, u'waterway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'evergreen')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"distance" - # fixChangeKey:"kp => distance" - err.append({'class': 9002001, 'subclass': 1078799228, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leaf_cycle=evergreen" + # fixAdd:"leaf_cycle=evergreen" + # fixRemove:"{0.key}" + err.append({'class': 9002001, 'subclass': 747964532, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'distance', mapcss.tag(tags, u'kp')]]), + [u'leaf_cycle',u'evergreen']]), '-': ([ - u'kp']) + mapcss._tag_uncapture(capture_tags, u'{0.key}')]) }}) - # *[pk][highway=milestone] - # *[pk][railway=milestone] - # *[pk][waterway=milestone] - if (u'highway' in keys and u'pk' in keys) or (u'pk' in keys and u'railway' in keys) or (u'pk' in keys and u'waterway' in keys): + # *[type=deciduous] + # *[type=deciduos] + if (u'type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'pk') and mapcss._tag_capture(capture_tags, 1, tags, u'highway') == mapcss._value_capture(capture_tags, 1, u'milestone')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'pk') and mapcss._tag_capture(capture_tags, 1, tags, u'railway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'deciduous')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'pk') and mapcss._tag_capture(capture_tags, 1, tags, u'waterway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'deciduos')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"distance" - # fixChangeKey:"pk => distance" - err.append({'class': 9002001, 'subclass': 719029418, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leaf_cycle=deciduous" + # fixAdd:"leaf_cycle=deciduous" + # fixRemove:"type" + err.append({'class': 9002001, 'subclass': 591116099, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'distance', mapcss.tag(tags, u'pk')]]), + [u'leaf_cycle',u'deciduous']]), '-': ([ - u'pk']) + u'type']) }}) - # *[postcode] - if (u'postcode' in keys): + # *[wood=deciduous] + if (u'wood' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'postcode')) - except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"addr:postcode" - # suggestAlternative:"postal_code" - err.append({'class': 9002001, 'subclass': 1942523538, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - - # *[water=intermittent] - if (u'water' in keys): - match = False - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'intermittent')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'deciduous')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"intermittent=yes" - # fixAdd:"intermittent=yes" - # fixRemove:"water" - err.append({'class': 9002001, 'subclass': 813530321, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'intermittent',u'yes']]), - '-': ([ - u'water']) - }}) + # suggestAlternative:"leaf_type + leaf_cycle" + err.append({'class': 9002001, 'subclass': 1100223594, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # way[type][type!=waterway][man_made=pipeline] - if (u'man_made' in keys and u'type' in keys): + # way[type=palm] + if (u'type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') and mapcss._tag_capture(capture_tags, 1, tags, u'type') != mapcss._value_const_capture(capture_tags, 1, u'waterway', u'waterway') and mapcss._tag_capture(capture_tags, 2, tags, u'man_made') == mapcss._value_capture(capture_tags, 2, u'pipeline')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'palm')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"substance" - # fixChangeKey:"type => substance" - err.append({'class': 9002001, 'subclass': 877981524, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'substance', mapcss.tag(tags, u'type')]]), - '-': ([ - u'type']) - }}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leaf_type" + # suggestAlternative:"species" + # suggestAlternative:"trees" + err.append({'class': 9002001, 'subclass': 1757132153, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[landuse=farm] - if (u'landuse' in keys): + # *[natural=land] + if (u'natural' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'farm')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'land')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"landuse=farmland" - # suggestAlternative:"landuse=farmyard" - err.append({'class': 9002001, 'subclass': 1968473048, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated. Please use instead a multipolygon.","{0.tag}") + # assertMatch:"way natural=land" + err.append({'class': 9002001, 'subclass': 94558529, 'text': mapcss.tr(u'{0} is deprecated. Please use instead a multipolygon.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[seamark=buoy]["seamark:type"=~/^(buoy_cardinal|buoy_installation|buoy_isolated_danger|buoy_lateral|buoy_safe_water|buoy_special_purpose|mooring)$/] - if (u'seamark' in keys and u'seamark:type' in keys): + # *[bridge=causeway] + if (u'bridge' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'seamark') == mapcss._value_capture(capture_tags, 0, u'buoy') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_61b0be1b), mapcss._tag_capture(capture_tags, 1, tags, u'seamark:type'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'causeway')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"{1.tag}" - # fixRemove:"seamark" - err.append({'class': 9002001, 'subclass': 1224401740, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '-': ([ - u'seamark']) - }}) + # suggestAlternative:"bridge=low_water_crossing" + # suggestAlternative:"embankment=yes" + # suggestAlternative:"ford=yes" + err.append({'class': 9002001, 'subclass': 461671124, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[seamark=buoy]["seamark:type"!~/^(buoy_cardinal|buoy_installation|buoy_isolated_danger|buoy_lateral|buoy_safe_water|buoy_special_purpose|mooring)$/] - if (u'seamark' in keys): + # *[bridge=swing] + if (u'bridge' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'seamark') == mapcss._value_capture(capture_tags, 0, u'buoy') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_61b0be1b, u'^(buoy_cardinal|buoy_installation|buoy_isolated_danger|buoy_lateral|buoy_safe_water|buoy_special_purpose|mooring)$'), mapcss._tag_capture(capture_tags, 1, tags, u'seamark:type'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'swing')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"{1.tag}" - err.append({'class': 9002001, 'subclass': 1481035998, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"bridge:movable=swing" + # suggestAlternative:"bridge:structure=simple-suspension" + err.append({'class': 9002001, 'subclass': 1047428067, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[landuse=conservation] - if (u'landuse' in keys): + # *[bridge=suspension] + if (u'bridge' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'conservation')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'suspension')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"boundary=protected_area" - # fixAdd:"boundary=protected_area" - # fixRemove:"landuse" - err.append({'class': 9002001, 'subclass': 824801072, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"bridge=yes + bridge:structure=suspension" + # fixAdd:"bridge:structure=suspension" + # fixAdd:"bridge=yes" + err.append({'class': 9002001, 'subclass': 1157046268, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'boundary',u'protected_area']]), - '-': ([ - u'landuse']) + [u'bridge:structure',u'suspension'], + [u'bridge',u'yes']]) }}) - # *[amenity=kiosk] - if (u'amenity' in keys): + # *[bridge=pontoon] + if (u'bridge' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'kiosk')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'pontoon')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=kiosk" - # fixChangeKey:"amenity => shop" - err.append({'class': 9002001, 'subclass': 1331930630, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"bridge=yes + bridge:structure=floating" + # fixAdd:"bridge:structure=floating" + # fixAdd:"bridge=yes" + err.append({'class': 9002001, 'subclass': 1195531951, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'shop', mapcss.tag(tags, u'amenity')]]), - '-': ([ - u'amenity']) + [u'bridge:structure',u'floating'], + [u'bridge',u'yes']]) }}) - # *[amenity=shop] - if (u'amenity' in keys): + # *[fee=interval] + # *[lit=interval] + # *[supervised=interval] + if (u'fee' in keys) or (u'lit' in keys) or (u'supervised' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'shop')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fee') == mapcss._value_capture(capture_tags, 0, u'interval')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=*" - err.append({'class': 9002001, 'subclass': 1562207150, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[shop=fishmonger] - if (u'shop' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'fishmonger')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'lit') == mapcss._value_capture(capture_tags, 0, u'interval')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=seafood" - # fixAdd:"shop=seafood" - err.append({'class': 9002001, 'subclass': 1376789416, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'shop',u'seafood']]) - }}) - - # *[shop=fish] - if (u'shop' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'fish')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'supervised') == mapcss._value_capture(capture_tags, 0, u'interval')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=fishing" - # suggestAlternative:"shop=pet" - # suggestAlternative:"shop=seafood" - err.append({'class': 9002001, 'subclass': 47191734, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated. Please specify interval by using opening_hours syntax","{0.tag}") + err.append({'class': 9002001, 'subclass': 417886592, 'text': mapcss.tr(u'{0} is deprecated. Please specify interval by using opening_hours syntax', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[shop=betting] - if (u'shop' in keys): + # *[/josm\/ignore/] + if True: match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'betting')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_5ee0acf2)) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=casino" - # suggestAlternative:"amenity=gambling" - # suggestAlternative:"leisure=adult_gaming_centre" - # suggestAlternative:"leisure=amusement_arcade" - # suggestAlternative:"shop=bookmaker" - # suggestAlternative:"shop=lottery" - err.append({'class': 9002001, 'subclass': 1035501389, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwError:tr("{0} is deprecated. Please delete this object and use a private layer instead","{0.key}") + # fixDeleteObject:this + err.append({'class': 9002001, 'subclass': 1402743016, 'text': mapcss.tr(u'{0} is deprecated. Please delete this object and use a private layer instead', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[shop=perfume] - if (u'shop' in keys): + # *[sport=diving] + if (u'sport' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'perfume')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'diving')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=perfumery" - # fixAdd:"shop=perfumery" - err.append({'class': 9002001, 'subclass': 2075099676, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'shop',u'perfumery']]) - }}) + # suggestAlternative:"sport=cliff_diving" + # suggestAlternative:"sport=scuba_diving" + err.append({'class': 9002001, 'subclass': 590643159, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[amenity=exercise_point] - if (u'amenity' in keys): + # *[parking=park_and_ride] + if (u'parking' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'exercise_point')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'parking') == mapcss._value_capture(capture_tags, 0, u'park_and_ride')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leisure=fitness_station" - # fixRemove:"amenity" - # fixAdd:"leisure=fitness_station" - err.append({'class': 9002001, 'subclass': 1514920202, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"amenity=parking + park_ride=yes" + # fixAdd:"amenity=parking" + # fixAdd:"park_ride=yes" + # fixRemove:"parking" + err.append({'class': 9002001, 'subclass': 1893516041, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'leisure',u'fitness_station']]), + [u'amenity',u'parking'], + [u'park_ride',u'yes']]), '-': ([ - u'amenity']) + u'parking']) }}) - # *[shop=auto_parts] - if (u'shop' in keys): + # *[police=yes] + # *[traffic_calming=yes] + # *[access=restricted] + # *[barrier=yes] + # *[aerialway=yes][!public_transport] + # *[amenity=yes] + # *[leisure=yes] + # *[shop="*"] + # *[shop=yes][amenity!=fuel] + # *[craft=yes] + # *[service=yes] + # *[place=yes] + if (u'access' in keys) or (u'aerialway' in keys) or (u'amenity' in keys) or (u'barrier' in keys) or (u'craft' in keys) or (u'leisure' in keys) or (u'place' in keys) or (u'police' in keys) or (u'service' in keys) or (u'shop' in keys) or (u'traffic_calming' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'auto_parts')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'police') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=car_parts" - # fixAdd:"shop=car_parts" - err.append({'class': 9002001, 'subclass': 1675828779, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'shop',u'car_parts']]) - }}) - - # *[amenity=car_repair] - if (u'amenity' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'car_repair')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'traffic_calming') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=car_repair" - # fixChangeKey:"amenity => shop" - err.append({'class': 9002001, 'subclass': 1681273585, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'shop', mapcss.tag(tags, u'amenity')]]), - '-': ([ - u'amenity']) - }}) - - # *[amenity=studio][type=audio] - # *[amenity=studio][type=radio] - # *[amenity=studio][type=television] - # *[amenity=studio][type=video] - if (u'amenity' in keys and u'type' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'audio')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'restricted')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'radio')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'television')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aerialway') == mapcss._value_capture(capture_tags, 0, u'yes') and not mapcss._tag_capture(capture_tags, 1, tags, u'public_transport')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'video')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'*')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'yes') and mapcss._tag_capture(capture_tags, 1, tags, u'amenity') != mapcss._value_const_capture(capture_tags, 1, u'fuel', u'fuel')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'craft') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'service') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated for {1}","{1.key}","{0.tag}") - # suggestAlternative:"studio" - # fixChangeKey:"type => studio" - err.append({'class': 9002001, 'subclass': 413401822, 'text': mapcss.tr(u'{0} is deprecated for {1}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'studio', mapcss.tag(tags, u'type')]]), - '-': ([ - u'type']) - }}) + # throwWarning:tr("{0}={1} is unspecific. Please replace ''{1}'' by a specific value.","{0.key}","{0.value}") + err.append({'class': 9002007, 'subclass': 1089883099, 'text': mapcss.tr(u'{0}={1} is unspecific. Please replace \'\'{1}\'\' by a specific value.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) - # *[power=cable_distribution_cabinet] - if (u'power' in keys): + # *[place_name][!name] + if (u'place_name' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'cable_distribution_cabinet')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place_name') and not mapcss._tag_capture(capture_tags, 1, tags, u'name')) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"man_made=street_cabinet + street_cabinet=*" - # fixAdd:"man_made=street_cabinet" - # fixRemove:"power" - err.append({'class': 9002001, 'subclass': 1007567078, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} should be replaced with {1}","{0.key}","{1.key}") + # fixChangeKey:"place_name => name" + err.append({'class': 9002008, 'subclass': 1089331760, 'text': mapcss.tr(u'{0} should be replaced with {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'man_made',u'street_cabinet']]), + [u'name', mapcss.tag(tags, u'place_name')]]), '-': ([ - u'power']) + u'place_name']) }}) - # *[power][location=kiosk] - if (u'location' in keys and u'power' in keys): + # *[place][place_name=*name] + if (u'place' in keys and u'place_name' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') and mapcss._tag_capture(capture_tags, 1, tags, u'location') == mapcss._value_capture(capture_tags, 1, u'kiosk')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place') and mapcss._tag_capture(capture_tags, 1, tags, u'place_name') == mapcss._value_capture(capture_tags, 1, mapcss.tag(tags, u'name'))) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{1.tag}") - # fixRemove:"location" - # fixAdd:"man_made=street_cabinet" - # fixAdd:"street_cabinet=power" - err.append({'class': 9002001, 'subclass': 182905067, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{1.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'man_made',u'street_cabinet'], - [u'street_cabinet',u'power']]), + # throwWarning:tr("{0} = {1}; remove {0}","{1.key}","{1.value}") + # fixRemove:"{1.key}" + err.append({'class': 9002009, 'subclass': 1116761280, 'text': mapcss.tr(u'{0} = {1}; remove {0}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{1.value}')), 'allow_fix_override': True, 'fix': { '-': ([ - u'location']) + mapcss._tag_uncapture(capture_tags, u'{1.key}')]) }}) - # *[man_made=well] - if (u'man_made' in keys): + # way[sidewalk=yes] + if (u'sidewalk' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'well')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sidewalk') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"man_made=petroleum_well" - # suggestAlternative:"man_made=water_well" - err.append({'class': 9002001, 'subclass': 1740864107, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0}={1} is unspecific. Please replace ''{1}'' by ''left'', ''right'' or ''both''.","{0.key}","{0.value}") + err.append({'class': 9002015, 'subclass': 36539821, 'text': mapcss.tr(u'{0}={1} is unspecific. Please replace \'\'{1}\'\' by \'\'left\'\', \'\'right\'\' or \'\'both\'\'.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) - # *[amenity=dog_bin] - # *[amenity=dog_waste_bin] - if (u'amenity' in keys): + # *[waterway=water_point] + if (u'waterway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'dog_bin')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'dog_waste_bin')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'water_point')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=waste_basket + waste=dog_excrement + vending=excrement_bags" - # fixAdd:"amenity=waste_basket" - # fixAdd:"vending=excrement_bags" - # fixAdd:"waste=dog_excrement" - err.append({'class': 9002001, 'subclass': 2091877281, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"amenity=water_point" + # fixChangeKey:"waterway => amenity" + err.append({'class': 9002001, 'subclass': 103347605, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'amenity',u'waste_basket'], - [u'vending',u'excrement_bags'], - [u'waste',u'dog_excrement']]) + [u'amenity', mapcss.tag(tags, u'waterway')]]), + '-': ([ + u'waterway']) }}) - # *[amenity=artwork] - if (u'amenity' in keys): + # *[waterway=waste_disposal] + if (u'waterway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'artwork')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'waste_disposal')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"tourism=artwork" - # fixRemove:"amenity" - # fixAdd:"tourism=artwork" - err.append({'class': 9002001, 'subclass': 728429076, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"amenity=waste_disposal" + # fixChangeKey:"waterway => amenity" + err.append({'class': 9002001, 'subclass': 1963461348, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'tourism',u'artwork']]), + [u'amenity', mapcss.tag(tags, u'waterway')]]), '-': ([ - u'amenity']) + u'waterway']) }}) - # *[amenity=community_center] - if (u'amenity' in keys): + # *[waterway=mooring] + if (u'waterway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'community_center')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'mooring')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=community_centre" - # fixAdd:"amenity=community_centre" - err.append({'class': 9002001, 'subclass': 690512681, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"mooring=yes" + # fixAdd:"mooring=yes" + # fixRemove:"waterway" + err.append({'class': 9002001, 'subclass': 81358738, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'amenity',u'community_centre']]) + [u'mooring',u'yes']]), + '-': ([ + u'waterway']) }}) - # *[man_made=cut_line] - if (u'man_made' in keys): + # *[building][levels] + # *[building:part=yes][levels] + if (u'building' in keys and u'levels' in keys) or (u'building:part' in keys and u'levels' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'cut_line')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') and mapcss._tag_capture(capture_tags, 1, tags, u'levels')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"man_made=cutline" - # fixAdd:"man_made=cutline" - err.append({'class': 9002001, 'subclass': 1008752382, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'man_made',u'cutline']]) - }}) - - # *[amenity=park] - if (u'amenity' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'park')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building:part') == mapcss._value_capture(capture_tags, 0, u'yes') and mapcss._tag_capture(capture_tags, 1, tags, u'levels')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leisure=park" - # fixRemove:"amenity" - # fixAdd:"leisure=park" - err.append({'class': 9002001, 'subclass': 2085280194, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{1.key}") + # suggestAlternative:"building:levels" + # fixChangeKey:"levels => building:levels" + err.append({'class': 9002001, 'subclass': 293177436, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{1.key}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'leisure',u'park']]), + [u'building:levels', mapcss.tag(tags, u'levels')]]), '-': ([ - u'amenity']) + u'levels']) }}) - # *[amenity=hotel] - if (u'amenity' in keys): + # *[protected_class] + if (u'protected_class' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'hotel')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'protected_class')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"tourism=hotel" - # fixRemove:"amenity" - # fixAdd:"tourism=hotel" - err.append({'class': 9002001, 'subclass': 1341786818, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"protect_class" + # fixChangeKey:"protected_class => protect_class" + err.append({'class': 9002001, 'subclass': 716999373, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'tourism',u'hotel']]), + [u'protect_class', mapcss.tag(tags, u'protected_class')]]), '-': ([ - u'amenity']) + u'protected_class']) }}) - # *[shop=window] - # *[shop=windows] - if (u'shop' in keys): + # *[lock=unknown] + # *[hide=unknown] + # *[shelter=unknown] + # *[access=unknown] + # *[capacity:parent=unknown] + # *[capacity:women=unknown] + # *[capacity:disabled=unknown] + # *[crossing=unknown] + # *[foot=unknown] + if (u'access' in keys) or (u'capacity:disabled' in keys) or (u'capacity:parent' in keys) or (u'capacity:women' in keys) or (u'crossing' in keys) or (u'foot' in keys) or (u'hide' in keys) or (u'lock' in keys) or (u'shelter' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'window')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'lock') == mapcss._value_capture(capture_tags, 0, u'unknown')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'windows')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'hide') == mapcss._value_capture(capture_tags, 0, u'unknown')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"craft=window_construction" - # fixAdd:"craft=window_construction" - # fixRemove:"shop" - err.append({'class': 9002001, 'subclass': 532391183, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'craft',u'window_construction']]), - '-': ([ - u'shop']) - }}) - - # *[amenity=education] - if (u'amenity' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'education')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shelter') == mapcss._value_capture(capture_tags, 0, u'unknown')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=college" - # suggestAlternative:"amenity=school" - # suggestAlternative:"amenity=university" - err.append({'class': 9002001, 'subclass': 796960259, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[shop=gallery] - if (u'shop' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'gallery')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'unknown')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=art" - # fixAdd:"shop=art" - err.append({'class': 9002001, 'subclass': 1319611546, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'shop',u'art']]) - }}) - - # *[shop=gambling] - # *[leisure=gambling] - if (u'leisure' in keys) or (u'shop' in keys): - match = False - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'gambling')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'gambling')) - except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=casino" - # suggestAlternative:"amenity=gambling" - # suggestAlternative:"leisure=amusement_arcade" - # suggestAlternative:"shop=bookmaker" - # suggestAlternative:"shop=lottery" - err.append({'class': 9002001, 'subclass': 1955724853, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[office=real_estate_agent] - if (u'office' in keys): - match = False - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'office') == mapcss._value_capture(capture_tags, 0, u'real_estate_agent')) - except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"office=estate_agent " - # fixAdd:"office=estate_agent " - err.append({'class': 9002001, 'subclass': 1340846055, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'office',u'estate_agent']]) - }}) - - # *[shop=glass] - if (u'shop' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'glass')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'capacity:parent') == mapcss._value_capture(capture_tags, 0, u'unknown')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"craft=glaziery" - # suggestAlternative:"shop=glaziery" - err.append({'class': 9002001, 'subclass': 712020531, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[amenity=proposed] - # *[amenity=proposed] - # *[amenity=disused] - # *[shop=disused] - # *[historic=abandoned] - if (u'amenity' in keys) or (u'historic' in keys) or (u'shop' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'proposed')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'capacity:women') == mapcss._value_capture(capture_tags, 0, u'unknown')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'proposed')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'capacity:disabled') == mapcss._value_capture(capture_tags, 0, u'unknown')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'disused')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'crossing') == mapcss._value_capture(capture_tags, 0, u'unknown')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'disused')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'foot') == mapcss._value_capture(capture_tags, 0, u'unknown')) except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("Unspecific tag {0}","{0.tag}") + err.append({'class': 9002010, 'subclass': 1289257359, 'text': mapcss.tr(u'Unspecific tag {0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[sport=skiing] + if (u'sport' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'historic') == mapcss._value_capture(capture_tags, 0, u'abandoned')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'skiing')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated. Use the {1}: key prefix instead.","{0.tag}","{0.value}") - err.append({'class': 9002001, 'subclass': 283558204, 'text': mapcss.tr(u'{0} is deprecated. Use the {1}: key prefix instead.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) + # throwWarning:tr("Definition of {0} is unclear","{0.tag}") + # suggestAlternative:tr("{0} + {1} + {2}","piste:type=*","piste:difficulty=*","piste:grooming=*") + err.append({'class': 9002001, 'subclass': 1578959559, 'text': mapcss.tr(u'Definition of {0} is unclear', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[amenity=swimming_pool] - if (u'amenity' in keys): + # *[waterway=wadi] + if (u'waterway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'swimming_pool')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'wadi')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leisure=swimming_pool" - # fixChangeKey:"amenity => leisure" - err.append({'class': 9002001, 'subclass': 2012807801, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'leisure', mapcss.tag(tags, u'amenity')]]), - '-': ([ - u'amenity']) - }}) + # suggestAlternative:"natural=valley" + # suggestAlternative:"{0.key}=* + intermittent=yes" + err.append({'class': 9002001, 'subclass': 719234223, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[amenity=sauna] - if (u'amenity' in keys): + # way[oneway=1][!waterway] + if (u'oneway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'sauna')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'oneway') == mapcss._value_capture(capture_tags, 0, 1) and not mapcss._tag_capture(capture_tags, 1, tags, u'waterway')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leisure=sauna" - # fixChangeKey:"amenity => leisure" - err.append({'class': 9002001, 'subclass': 1450116742, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"oneway=yes" + # fixAdd:"oneway=yes" + err.append({'class': 9002001, 'subclass': 430545008, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'leisure', mapcss.tag(tags, u'amenity')]]), - '-': ([ - u'amenity']) + [u'oneway',u'yes']]) }}) - # *[/^[^t][^i][^g].+_[0-9]$/][!/^note_[0-9]$/][!/^description_[0-9]$/] - if True: + # way[oneway=-1][!waterway] + if (u'oneway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_300dfa36) and not mapcss._tag_capture(capture_tags, 1, tags, self.re_3185ac6d) and not mapcss._tag_capture(capture_tags, 2, tags, self.re_6d27b157)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'oneway') == mapcss._value_capture(capture_tags, 0, -1) and not mapcss._tag_capture(capture_tags, 1, tags, u'waterway')) except mapcss.RuleAbort: pass if match: - # group:tr("questionable key (ending with a number)") - # throwWarning:tr("{0}","{0.key}") - # assertNoMatch:"way description_3=foo" - # assertMatch:"way name_1=foo" - # assertNoMatch:"way note_2=foo" - # assertNoMatch:"way tiger:name_base_1=bar" - err.append({'class': 9002014, 'subclass': 2081989305, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # throwWarning:tr("{0} is not recommended. Use the Reverse Ways function from the Tools menu.","{0.tag}") + err.append({'class': 9002016, 'subclass': 1448981670, 'text': mapcss.tr(u'{0} is not recommended. Use the Reverse Ways function from the Tools menu.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[sport=skating] - if (u'sport' in keys): + # *[drinkable] + if (u'drinkable' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'skating')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'drinkable')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"sport=ice_skating" - # suggestAlternative:"sport=roller_skating" - err.append({'class': 9002001, 'subclass': 170699177, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"drinking_water" + err.append({'class': 9002001, 'subclass': 1785584789, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # way[barrier=wall][type=noise_barrier][!wall] - # way[barrier=wall][type=noise_barrier][wall=noise_barrier] - if (u'barrier' in keys and u'type' in keys) or (u'barrier' in keys and u'type' in keys and u'wall' in keys): + # *[color][!colour] + if (u'color' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'wall') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'noise_barrier') and not mapcss._tag_capture(capture_tags, 2, tags, u'wall')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'wall') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'noise_barrier') and mapcss._tag_capture(capture_tags, 2, tags, u'wall') == mapcss._value_capture(capture_tags, 2, u'noise_barrier')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'color') and not mapcss._tag_capture(capture_tags, 1, tags, u'colour')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{1.tag}") - # suggestAlternative:"wall=noise_barrier" - # fixChangeKey:"type => wall" - err.append({'class': 9002001, 'subclass': 1513752031, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{1.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"colour" + # fixChangeKey:"color => colour" + # assertNoMatch:"way color=red colour=red" + # assertMatch:"way color=red" + err.append({'class': 9002001, 'subclass': 1850270072, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'wall', mapcss.tag(tags, u'type')]]), + [u'colour', mapcss.tag(tags, u'color')]]), '-': ([ - u'type']) + u'color']) }}) - # way[barrier=wall][type=noise_barrier][wall][wall!=noise_barrier] - if (u'barrier' in keys and u'type' in keys and u'wall' in keys): + # *[color][colour][color=*colour] + if (u'color' in keys and u'colour' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'wall') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'noise_barrier') and mapcss._tag_capture(capture_tags, 2, tags, u'wall') and mapcss._tag_capture(capture_tags, 3, tags, u'wall') != mapcss._value_const_capture(capture_tags, 3, u'noise_barrier', u'noise_barrier')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'color') and mapcss._tag_capture(capture_tags, 1, tags, u'colour') and mapcss._tag_capture(capture_tags, 2, tags, u'color') == mapcss._value_capture(capture_tags, 2, mapcss.tag(tags, u'colour'))) except mapcss.RuleAbort: pass if match: + # setsamecolor # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{1.tag}") - # suggestAlternative:"wall=noise_barrier" - err.append({'class': 9002001, 'subclass': 2130256462, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + # throwWarning:tr("{0} together with {1}","{0.key}","{1.key}") + # suggestAlternative:"colour" + # fixRemove:"color" + # assertNoMatch:"way color=red colour=green" + # assertMatch:"way color=red colour=red" + set_samecolor = True + err.append({'class': 9002001, 'subclass': 1825345743, 'text': mapcss.tr(u'{0} together with {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'color']) + }}) - # *[amenity=public_building] - if (u'amenity' in keys): + # *[color][colour]!.samecolor + if (u'color' in keys and u'colour' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'public_building')) + try: match = (not set_samecolor and mapcss._tag_capture(capture_tags, 0, tags, u'color') and mapcss._tag_capture(capture_tags, 1, tags, u'colour')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"..." - # suggestAlternative:"amenity=community_centre" - # suggestAlternative:"amenity=hospital" - # suggestAlternative:"amenity=townhall" - # suggestAlternative:"building=hospital" - # suggestAlternative:"building=public" - # suggestAlternative:"leisure=sports_centre" - # suggestAlternative:"office=government" - err.append({'class': 9002001, 'subclass': 1295642010, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} together with {1} and conflicting values","{0.key}","{1.key}") + # suggestAlternative:"colour" + # assertMatch:"way color=red colour=green" + # assertNoMatch:"way color=red colour=red" + err.append({'class': 9002001, 'subclass': 1064658218, 'text': mapcss.tr(u'{0} together with {1} and conflicting values', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) - # *[vending=news_papers] - if (u'vending' in keys): + # *[building:color][building:colour]!.samebuildingcolor + # Use undeclared class samebuildingcolor + + # *[roof:color][roof:colour]!.sameroofcolor + # Use undeclared class sameroofcolor + + # *[/:color/][!building:color][!roof:color] + if True: match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'vending') == mapcss._value_capture(capture_tags, 0, u'news_papers')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_554de4c7) and not mapcss._tag_capture(capture_tags, 1, tags, u'building:color') and not mapcss._tag_capture(capture_tags, 2, tags, u'roof:color')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"vending=newspapers" - # fixAdd:"vending=newspapers" - err.append({'class': 9002001, 'subclass': 1133820292, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'vending',u'newspapers']]) - }}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:":colour" + # assertNoMatch:"way color=red" + # assertMatch:"way cycleway:surface:color=grey" + # assertNoMatch:"way roof:color=grey" + err.append({'class': 9002001, 'subclass': 238251143, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[service=drive_through] - if (u'service' in keys): + # *[/color:/] + if True: match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'service') == mapcss._value_capture(capture_tags, 0, u'drive_through')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_0c5b5730)) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"service=drive-through" - # fixAdd:"service=drive-through" - err.append({'class': 9002001, 'subclass': 283545650, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'service',u'drive-through']]) - }}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"colour:" + # assertMatch:"way color:back=grey" + # assertNoMatch:"way color=red" + err.append({'class': 9002001, 'subclass': 1390370717, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # way[highway=service][service][service!~/^(alley|drive-through|drive_through|driveway|emergency_access|parking_aisle|rest_area|yes)$/] - # way[railway=rail][service][service!~/^(crossover|siding|spur|yard)$/] - # way[waterway=canal][service][service!~/^(irrigation|transportation|water_power)$/] - if (u'highway' in keys and u'service' in keys) or (u'railway' in keys and u'service' in keys) or (u'service' in keys and u'waterway' in keys): + # *[/=|\+|\/|&|<|>|;|'|"|%|#|@|\\|,|\.|\{|\}|\?|\*|\^|\$/] + if True: match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'service') and mapcss._tag_capture(capture_tags, 1, tags, u'service') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_05edd24e, u'^(alley|drive-through|drive_through|driveway|emergency_access|parking_aisle|rest_area|yes)$'), mapcss._tag_capture(capture_tags, 2, tags, u'service'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_620f4d52)) except mapcss.RuleAbort: pass + if match: + # group:tr("key with uncommon character") + # throwWarning:tr("{0}","{0.key}") + err.append({'class': 9002011, 'subclass': 1752615188, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[/^.$/] + # way[/^..$/] + if True: + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'railway') == mapcss._value_capture(capture_tags, 0, u'rail') and mapcss._tag_capture(capture_tags, 1, tags, u'service') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_2fd4cdcf, u'^(crossover|siding|spur|yard)$'), mapcss._tag_capture(capture_tags, 2, tags, u'service'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_27210286)) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'canal') and mapcss._tag_capture(capture_tags, 1, tags, u'service') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_7a045a17, u'^(irrigation|transportation|water_power)$'), mapcss._tag_capture(capture_tags, 2, tags, u'service'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_34c15d62)) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("The key {0} has an uncommon value.","{1.key}") - err.append({'class': 9002017, 'subclass': 275832859, 'text': mapcss.tr(u'The key {0} has an uncommon value.', mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) + # throwWarning:tr("uncommon short key") + # assertMatch:"way to=bar" + err.append({'class': 9002012, 'subclass': 73953777, 'text': mapcss.tr(u'uncommon short key')}) - # *[name:botanical] - if (u'name:botanical' in keys): + # *[sport=hockey] + if (u'sport' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name:botanical')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'hockey')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"species" - err.append({'class': 9002001, 'subclass': 1061429000, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"sport=field_hockey" + # suggestAlternative:"sport=ice_hockey" + err.append({'class': 9002001, 'subclass': 651933474, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[shop=souvenir] - # *[shop=souvenirs] - # *[shop=souveniers] - if (u'shop' in keys): + # *[sport=billard] + # *[sport=billards] + # *[sport=billiard] + if (u'sport' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'souvenir')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'billard')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'souvenirs')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'billards')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'souveniers')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'billiard')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=gift" - # fixAdd:"shop=gift" - err.append({'class': 9002001, 'subclass': 1794702946, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"sport=billiards" + # fixAdd:"sport=billiards" + err.append({'class': 9002001, 'subclass': 1522897824, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'shop',u'gift']]) + [u'sport',u'billiards']]) }}) - # *[vending=animal_food] - if (u'vending' in keys): + # *[payment:credit_cards=yes] + if (u'payment:credit_cards' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'vending') == mapcss._value_capture(capture_tags, 0, u'animal_food')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:credit_cards') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"vending=animal_feed" - # fixAdd:"vending=animal_feed" - err.append({'class': 9002001, 'subclass': 1077411296, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'vending',u'animal_feed']]) - }}) + # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:mastercard=yes","payment:visa=yes") + err.append({'class': 9002013, 'subclass': 705181097, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:mastercard=yes', u'payment:visa=yes')}) - # way[highway=emergency_access_point][phone][!emergency_telephone_code] - if (u'highway' in keys and u'phone' in keys): + # *[payment:debit_cards=yes] + if (u'payment:debit_cards' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'emergency_access_point') and mapcss._tag_capture(capture_tags, 1, tags, u'phone') and not mapcss._tag_capture(capture_tags, 2, tags, u'emergency_telephone_code')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:debit_cards') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated for {1}","{1.key}","{0.tag}") - # suggestAlternative:"emergency_telephone_code" - # fixChangeKey:"phone => emergency_telephone_code" - err.append({'class': 9002001, 'subclass': 904792316, 'text': mapcss.tr(u'{0} is deprecated for {1}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'emergency_telephone_code', mapcss.tag(tags, u'phone')]]), - '-': ([ - u'phone']) - }}) + # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:maestro=yes","payment:girocard=yes") + err.append({'class': 9002013, 'subclass': 679215558, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:maestro=yes', u'payment:girocard=yes')}) - # way[highway=emergency_access_point][phone=*emergency_telephone_code] - if (u'highway' in keys and u'phone' in keys): + # *[payment:electronic_purses=yes] + if (u'payment:electronic_purses' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'emergency_access_point') and mapcss._tag_capture(capture_tags, 1, tags, u'phone') == mapcss._value_capture(capture_tags, 1, mapcss.tag(tags, u'emergency_telephone_code'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:electronic_purses') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated for {1}","{1.key}","{0.tag}") - # suggestAlternative:"emergency_telephone_code" - # fixRemove:"phone" - err.append({'class': 9002001, 'subclass': 3132845, 'text': mapcss.tr(u'{0} is deprecated for {1}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '-': ([ - u'phone']) - }}) + # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:ep_geldkarte=yes","payment:ep_quick=yes") + err.append({'class': 9002013, 'subclass': 1440457244, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:ep_geldkarte=yes', u'payment:ep_quick=yes')}) - # way[highway=emergency_access_point][phone][emergency_telephone_code][phone!=*emergency_telephone_code] - if (u'emergency_telephone_code' in keys and u'highway' in keys and u'phone' in keys): + # *[payment:cryptocurrencies=yes] + if (u'payment:cryptocurrencies' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'emergency_access_point') and mapcss._tag_capture(capture_tags, 1, tags, u'phone') and mapcss._tag_capture(capture_tags, 2, tags, u'emergency_telephone_code') and mapcss._tag_capture(capture_tags, 3, tags, u'phone') != mapcss._value_capture(capture_tags, 3, mapcss.tag(tags, u'emergency_telephone_code'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:cryptocurrencies') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated for {1}","{1.key}","{0.tag}") - # suggestAlternative:"emergency_telephone_code" - err.append({'class': 9002001, 'subclass': 144379729, 'text': mapcss.tr(u'{0} is deprecated for {1}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:bitcoin=yes","payment:litecoin=yes") + err.append({'class': 9002013, 'subclass': 1325255949, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:bitcoin=yes', u'payment:litecoin=yes')}) - # way[tracktype=1] - if (u'tracktype' in keys): + # *[payment:ep_quick] + # *[payment:ep_cash] + # *[payment:ep_proton] + # *[payment:ep_chipknip] + if (u'payment:ep_cash' in keys) or (u'payment:ep_chipknip' in keys) or (u'payment:ep_proton' in keys) or (u'payment:ep_quick' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tracktype') == mapcss._value_capture(capture_tags, 0, 1)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_quick')) except mapcss.RuleAbort: pass - if match: - # group:tr("misspelled value") - # throwError:tr("{0}","{0.tag}") - # suggestAlternative:"tracktype=grade1" - # fixAdd:"tracktype=grade1" - err.append({'class': 9002018, 'subclass': 823078782, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'tracktype',u'grade1']]) - }}) - - # way[tracktype=2] - if (u'tracktype' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tracktype') == mapcss._value_capture(capture_tags, 0, 2)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_cash')) except mapcss.RuleAbort: pass - if match: - # group:tr("misspelled value") - # throwError:tr("{0}","{0.tag}") - # suggestAlternative:"tracktype=grade2" - # fixAdd:"tracktype=grade2" - err.append({'class': 9002018, 'subclass': 652259155, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'tracktype',u'grade2']]) - }}) - - # way[tracktype=3] - if (u'tracktype' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tracktype') == mapcss._value_capture(capture_tags, 0, 3)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_proton')) except mapcss.RuleAbort: pass - if match: - # group:tr("misspelled value") - # throwError:tr("{0}","{0.tag}") - # suggestAlternative:"tracktype=grade3" - # fixAdd:"tracktype=grade3" - err.append({'class': 9002018, 'subclass': 1624412111, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'tracktype',u'grade3']]) - }}) - - # way[tracktype=4] - if (u'tracktype' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tracktype') == mapcss._value_capture(capture_tags, 0, 4)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_chipknip')) except mapcss.RuleAbort: pass if match: - # group:tr("misspelled value") - # throwError:tr("{0}","{0.tag}") - # suggestAlternative:"tracktype=grade4" - # fixAdd:"tracktype=grade4" - err.append({'class': 9002018, 'subclass': 808384986, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'tracktype',u'grade4']]) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # fixRemove:"{0.key}" + err.append({'class': 9002001, 'subclass': 332575437, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '-': ([ + mapcss._tag_uncapture(capture_tags, u'{0.key}')]) }}) - # way[tracktype=5] - if (u'tracktype' in keys): + # *[kp][highway=milestone] + # *[kp][railway=milestone] + # *[kp][waterway=milestone] + if (u'highway' in keys and u'kp' in keys) or (u'kp' in keys and u'railway' in keys) or (u'kp' in keys and u'waterway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tracktype') == mapcss._value_capture(capture_tags, 0, 5)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kp') and mapcss._tag_capture(capture_tags, 1, tags, u'highway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kp') and mapcss._tag_capture(capture_tags, 1, tags, u'railway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kp') and mapcss._tag_capture(capture_tags, 1, tags, u'waterway') == mapcss._value_capture(capture_tags, 1, u'milestone')) except mapcss.RuleAbort: pass if match: - # group:tr("misspelled value") - # throwError:tr("{0}","{0.tag}") - # suggestAlternative:"tracktype=grade5" - # fixAdd:"tracktype=grade5" - err.append({'class': 9002018, 'subclass': 1050276122, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"distance" + # fixChangeKey:"kp => distance" + err.append({'class': 9002001, 'subclass': 1078799228, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'tracktype',u'grade5']]) + [u'distance', mapcss.tag(tags, u'kp')]]), + '-': ([ + u'kp']) }}) - # way[tracktype][tracktype!~/^(1|2|3|4|5|grade1|grade2|grade3|grade4|grade5)$/] - if (u'tracktype' in keys): + # *[pk][highway=milestone] + # *[pk][railway=milestone] + # *[pk][waterway=milestone] + if (u'highway' in keys and u'pk' in keys) or (u'pk' in keys and u'railway' in keys) or (u'pk' in keys and u'waterway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tracktype') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_047d5648, u'^(1|2|3|4|5|grade1|grade2|grade3|grade4|grade5)$'), mapcss._tag_capture(capture_tags, 1, tags, u'tracktype'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'pk') and mapcss._tag_capture(capture_tags, 1, tags, u'highway') == mapcss._value_capture(capture_tags, 1, u'milestone')) except mapcss.RuleAbort: pass - if match: - # throwError:tr("wrong value: {0}","{0.tag}") - # suggestAlternative:"tracktype=grade1" - # suggestAlternative:"tracktype=grade2" - # suggestAlternative:"tracktype=grade3" - # suggestAlternative:"tracktype=grade4" - # suggestAlternative:"tracktype=grade5" - err.append({'class': 9002019, 'subclass': 1665196665, 'text': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[amenity=hunting_stand][lock=yes] - # *[amenity=hunting_stand][lock=no] - if (u'amenity' in keys and u'lock' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'hunting_stand') and mapcss._tag_capture(capture_tags, 1, tags, u'lock') == mapcss._value_capture(capture_tags, 1, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'pk') and mapcss._tag_capture(capture_tags, 1, tags, u'railway') == mapcss._value_capture(capture_tags, 1, u'milestone')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'hunting_stand') and mapcss._tag_capture(capture_tags, 1, tags, u'lock') == mapcss._value_capture(capture_tags, 1, u'no')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'pk') and mapcss._tag_capture(capture_tags, 1, tags, u'waterway') == mapcss._value_capture(capture_tags, 1, u'milestone')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated for {1}","{1.key}","{0.tag}") - # suggestAlternative:"lockable" - # fixChangeKey:"lock => lockable" - err.append({'class': 9002001, 'subclass': 1939599742, 'text': mapcss.tr(u'{0} is deprecated for {1}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"distance" + # fixChangeKey:"pk => distance" + err.append({'class': 9002001, 'subclass': 719029418, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'lockable', mapcss.tag(tags, u'lock')]]), + [u'distance', mapcss.tag(tags, u'pk')]]), '-': ([ - u'lock']) + u'pk']) }}) - # *[amenity=advertising][!advertising] - if (u'amenity' in keys): + # *[postcode] + if (u'postcode' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'advertising') and not mapcss._tag_capture(capture_tags, 1, tags, u'advertising')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'postcode')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"advertising=*" - err.append({'class': 9002001, 'subclass': 1696784412, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"addr:postcode" + # suggestAlternative:"postal_code" + err.append({'class': 9002001, 'subclass': 1942523538, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[amenity=advertising][advertising] - if (u'advertising' in keys and u'amenity' in keys): + # *[water=intermittent] + if (u'water' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'advertising') and mapcss._tag_capture(capture_tags, 1, tags, u'advertising')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'intermittent')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"advertising=*" - # fixRemove:"amenity" - err.append({'class': 9002001, 'subclass': 1538706366, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"intermittent=yes" + # fixAdd:"intermittent=yes" + # fixRemove:"water" + err.append({'class': 9002001, 'subclass': 813530321, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'intermittent',u'yes']]), '-': ([ - u'amenity']) + u'water']) }}) - # way[direction=up][incline=up] - # way[direction=down][incline=down] - # way[direction=up][!incline] - # way[direction=down][!incline] - if (u'direction' in keys) or (u'direction' in keys and u'incline' in keys): + # way[type][type!=waterway][man_made=pipeline] + if (u'man_made' in keys and u'type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'direction') == mapcss._value_capture(capture_tags, 0, u'up') and mapcss._tag_capture(capture_tags, 1, tags, u'incline') == mapcss._value_capture(capture_tags, 1, u'up')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'direction') == mapcss._value_capture(capture_tags, 0, u'down') and mapcss._tag_capture(capture_tags, 1, tags, u'incline') == mapcss._value_capture(capture_tags, 1, u'down')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'direction') == mapcss._value_capture(capture_tags, 0, u'up') and not mapcss._tag_capture(capture_tags, 1, tags, u'incline')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'direction') == mapcss._value_capture(capture_tags, 0, u'down') and not mapcss._tag_capture(capture_tags, 1, tags, u'incline')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') and mapcss._tag_capture(capture_tags, 1, tags, u'type') != mapcss._value_const_capture(capture_tags, 1, u'waterway', u'waterway') and mapcss._tag_capture(capture_tags, 2, tags, u'man_made') == mapcss._value_capture(capture_tags, 2, u'pipeline')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"incline" - # fixChangeKey:"direction => incline" - err.append({'class': 9002001, 'subclass': 1707030473, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"substance" + # fixChangeKey:"type => substance" + err.append({'class': 9002001, 'subclass': 877981524, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'incline', mapcss.tag(tags, u'direction')]]), + [u'substance', mapcss.tag(tags, u'type')]]), '-': ([ - u'direction']) + u'type']) }}) - # way[direction=up][incline][incline!=up] - # way[direction=down][incline][incline!=down] - if (u'direction' in keys and u'incline' in keys): + # *[landuse=farm] + if (u'landuse' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'direction') == mapcss._value_capture(capture_tags, 0, u'up') and mapcss._tag_capture(capture_tags, 1, tags, u'incline') and mapcss._tag_capture(capture_tags, 2, tags, u'incline') != mapcss._value_const_capture(capture_tags, 2, u'up', u'up')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'direction') == mapcss._value_capture(capture_tags, 0, u'down') and mapcss._tag_capture(capture_tags, 1, tags, u'incline') and mapcss._tag_capture(capture_tags, 2, tags, u'incline') != mapcss._value_const_capture(capture_tags, 2, u'down', u'down')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'farm')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"incline" - err.append({'class': 9002001, 'subclass': 937812227, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"landuse=farmland" + # suggestAlternative:"landuse=farmyard" + err.append({'class': 9002001, 'subclass': 1968473048, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # way[building=y] - # way[building=1] - if (u'building' in keys): + # *[seamark=buoy]["seamark:type"=~/^(buoy_cardinal|buoy_installation|buoy_isolated_danger|buoy_lateral|buoy_safe_water|buoy_special_purpose|mooring)$/] + if (u'seamark' in keys and u'seamark:type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'y')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, 1)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'seamark') == mapcss._value_capture(capture_tags, 0, u'buoy') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_61b0be1b), mapcss._tag_capture(capture_tags, 1, tags, u'seamark:type'))) except mapcss.RuleAbort: pass if match: - # group:tr("misspelled value") - # throwError:tr("{0}","{0.tag}") - # suggestAlternative:"building=yes" - # fixAdd:"building=yes" - err.append({'class': 9002018, 'subclass': 58273074, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'building',u'yes']]) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"{1.tag}" + # fixRemove:"seamark" + err.append({'class': 9002001, 'subclass': 1224401740, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'seamark']) }}) - # way[water=salt] - # way[water=salt_pool] - # way[water=salt_panne] - # way[water=salt_pond] - if (u'water' in keys): + # *[seamark=buoy]["seamark:type"!~/^(buoy_cardinal|buoy_installation|buoy_isolated_danger|buoy_lateral|buoy_safe_water|buoy_special_purpose|mooring)$/] + if (u'seamark' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'salt')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'salt_pool')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'salt_panne')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'salt_pond')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'seamark') == mapcss._value_capture(capture_tags, 0, u'buoy') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_61b0be1b, u'^(buoy_cardinal|buoy_installation|buoy_isolated_danger|buoy_lateral|buoy_safe_water|buoy_special_purpose|mooring)$'), mapcss._tag_capture(capture_tags, 1, tags, u'seamark:type'))) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"landuse=salt_pond" - # suggestAlternative:"salt=yes" - err.append({'class': 9002001, 'subclass': 403932956, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"{1.tag}" + err.append({'class': 9002001, 'subclass': 1481035998, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # way[water=tidal] - if (u'water' in keys): + # *[landuse=conservation] + if (u'landuse' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'tidal')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'conservation')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"tidal=yes" - # fixAdd:"tidal=yes" - # fixRemove:"water" - err.append({'class': 9002001, 'subclass': 1201030806, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"boundary=protected_area" + # fixAdd:"boundary=protected_area" + # fixRemove:"landuse" + err.append({'class': 9002001, 'subclass': 824801072, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'tidal',u'yes']]), + [u'boundary',u'protected_area']]), '-': ([ - u'water']) + u'landuse']) }}) - # *[amenity=toilet] + # *[amenity=kiosk] if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'toilet')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'kiosk')) except mapcss.RuleAbort: pass if match: - # group:tr("misspelled value") - # throwError:tr("{0}","{0.tag}") - # suggestAlternative:"amenity=toilets" - # fixAdd:"amenity=toilets" - err.append({'class': 9002018, 'subclass': 440018606, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=kiosk" + # fixChangeKey:"amenity => shop" + err.append({'class': 9002001, 'subclass': 1331930630, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'amenity',u'toilets']]) + [u'shop', mapcss.tag(tags, u'amenity')]]), + '-': ([ + u'amenity']) }}) - # way[power=busbar] - if (u'power' in keys): + # *[amenity=shop] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'busbar')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'shop')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"power=line + line=busbar" - # fixAdd:"line=busbar" - # fixAdd:"power=line" - err.append({'class': 9002001, 'subclass': 2001565557, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'line',u'busbar'], - [u'power',u'line']]) - }}) + # suggestAlternative:"shop=*" + err.append({'class': 9002001, 'subclass': 1562207150, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[man_made=MDF] - # *[man_made=telephone_exchange] - if (u'man_made' in keys): + # *[shop=fishmonger] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'MDF')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'telephone_exchange')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'fishmonger')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"telecom=exchange" - # fixRemove:"man_made" - # fixAdd:"telecom=exchange" - err.append({'class': 9002001, 'subclass': 634698090, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"shop=seafood" + # fixAdd:"shop=seafood" + err.append({'class': 9002001, 'subclass': 1376789416, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'telecom',u'exchange']]), - '-': ([ - u'man_made']) + [u'shop',u'seafood']]) }}) - # *[building=central_office] - if (u'building' in keys): + # *[shop=fish] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'central_office')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'fish')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"telecom=exchange" - # fixAdd:"building=yes" - # fixAdd:"telecom=exchange" - err.append({'class': 9002001, 'subclass': 1091970270, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'building',u'yes'], - [u'telecom',u'exchange']]) - }}) + # suggestAlternative:"shop=fishing" + # suggestAlternative:"shop=pet" + # suggestAlternative:"shop=seafood" + err.append({'class': 9002001, 'subclass': 47191734, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[telecom=central_office] - if (u'telecom' in keys): + # *[shop=betting] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'telecom') == mapcss._value_capture(capture_tags, 0, u'central_office')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'betting')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"telecom=exchange" - # fixAdd:"telecom=exchange" - err.append({'class': 9002001, 'subclass': 1503278830, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'telecom',u'exchange']]) - }}) + # suggestAlternative:"amenity=casino" + # suggestAlternative:"amenity=gambling" + # suggestAlternative:"leisure=adult_gaming_centre" + # suggestAlternative:"leisure=amusement_arcade" + # suggestAlternative:"shop=bookmaker" + # suggestAlternative:"shop=lottery" + err.append({'class': 9002001, 'subclass': 1035501389, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[natural=waterfall] - if (u'natural' in keys): + # *[shop=perfume] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'waterfall')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'perfume')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"waterway=waterfall" - # fixChangeKey:"natural => waterway" - err.append({'class': 9002001, 'subclass': 764711734, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"shop=perfumery" + # fixAdd:"shop=perfumery" + err.append({'class': 9002001, 'subclass': 2075099676, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'waterway', mapcss.tag(tags, u'natural')]]), - '-': ([ - u'natural']) + [u'shop',u'perfumery']]) }}) - # *[religion=unitarian] - if (u'religion' in keys): - match = False + # *[amenity=exercise_point] + if (u'amenity' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'religion') == mapcss._value_capture(capture_tags, 0, u'unitarian')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'exercise_point')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"religion=unitarian_universalist" - # fixAdd:"religion=unitarian_universalist" - err.append({'class': 9002001, 'subclass': 9227331, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"leisure=fitness_station" + # fixRemove:"amenity" + # fixAdd:"leisure=fitness_station" + err.append({'class': 9002001, 'subclass': 1514920202, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'religion',u'unitarian_universalist']]) + [u'leisure',u'fitness_station']]), + '-': ([ + u'amenity']) }}) - # *[shop=shopping_centre] + # *[shop=auto_parts] if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'shopping_centre')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'auto_parts')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=mall" - # fixAdd:"shop=mall" - err.append({'class': 9002001, 'subclass': 1448390566, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"shop=car_parts" + # fixAdd:"shop=car_parts" + err.append({'class': 9002001, 'subclass': 1675828779, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'shop',u'mall']]) + [u'shop',u'car_parts']]) }}) - # *[is_in] - # way[/^is_in:.*$/] - if True: + # *[amenity=car_repair] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'is_in')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_493fd1a6)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'car_repair')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # fixRemove:"{0.key}" - err.append({'class': 9002001, 'subclass': 1865068642, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=car_repair" + # fixChangeKey:"amenity => shop" + err.append({'class': 9002001, 'subclass': 1681273585, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop', mapcss.tag(tags, u'amenity')]]), '-': ([ - mapcss._tag_uncapture(capture_tags, u'{0.key}')]) + u'amenity']) }}) - # *[sport=football] - if (u'sport' in keys): + # *[amenity=studio][type=audio] + # *[amenity=studio][type=radio] + # *[amenity=studio][type=television] + # *[amenity=studio][type=video] + if (u'amenity' in keys and u'type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'football')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'audio')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"sport=american_football" - # suggestAlternative:"sport=australian_football" - # suggestAlternative:"sport=canadian_football" - # suggestAlternative:"sport=gaelic_games" - # suggestAlternative:"sport=rugby_league" - # suggestAlternative:"sport=rugby_union" - # suggestAlternative:"sport=soccer" - err.append({'class': 9002001, 'subclass': 73038577, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[leisure=common] - if (u'leisure' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'common')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'radio')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"designation=common" - # suggestAlternative:"landuse=*" - # suggestAlternative:"leisure=*" - err.append({'class': 9002001, 'subclass': 157636301, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[cuisine=vegan] - # *[cuisine=vegetarian] - if (u'cuisine' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'cuisine') == mapcss._value_capture(capture_tags, 0, u'vegan')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'television')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'cuisine') == mapcss._value_capture(capture_tags, 0, u'vegetarian')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'video')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # suggestAlternative:concat("diet:","{0.value}","=only") - # suggestAlternative:concat("diet:","{0.value}","=yes") - # throwWarning:tr("{0} is deprecated","{0.tag}") - err.append({'class': 9002001, 'subclass': 43604574, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated for {1}","{1.key}","{0.tag}") + # suggestAlternative:"studio" + # fixChangeKey:"type => studio" + err.append({'class': 9002001, 'subclass': 413401822, 'text': mapcss.tr(u'{0} is deprecated for {1}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'studio', mapcss.tag(tags, u'type')]]), + '-': ([ + u'type']) + }}) - # *[kitchen_hours] - if (u'kitchen_hours' in keys): + # *[power=cable_distribution_cabinet] + if (u'power' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kitchen_hours')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'cable_distribution_cabinet')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"opening_hours:kitchen" - # fixChangeKey:"kitchen_hours => opening_hours:kitchen" - err.append({'class': 9002001, 'subclass': 1088306802, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"man_made=street_cabinet + street_cabinet=*" + # fixAdd:"man_made=street_cabinet" + # fixRemove:"power" + err.append({'class': 9002001, 'subclass': 1007567078, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'opening_hours:kitchen', mapcss.tag(tags, u'kitchen_hours')]]), + [u'man_made',u'street_cabinet']]), '-': ([ - u'kitchen_hours']) + u'power']) }}) - return err - - def relation(self, data, tags, members): - capture_tags = {} - keys = tags.keys() - err = [] - set_samecolor = False - - # *[barrier=wire_fence] - if (u'barrier' in keys): + # *[power][location=kiosk] + if (u'location' in keys and u'power' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'wire_fence')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') and mapcss._tag_capture(capture_tags, 1, tags, u'location') == mapcss._value_capture(capture_tags, 1, u'kiosk')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"barrier=fence + fence_type=chain_link" - # fixAdd:"barrier=fence" - # fixAdd:"fence_type=chain_link" - err.append({'class': 9002001, 'subclass': 1107799632, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{1.tag}") + # fixRemove:"location" + # fixAdd:"man_made=street_cabinet" + # fixAdd:"street_cabinet=power" + err.append({'class': 9002001, 'subclass': 182905067, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{1.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'barrier',u'fence'], - [u'fence_type',u'chain_link']]) + [u'man_made',u'street_cabinet'], + [u'street_cabinet',u'power']]), + '-': ([ + u'location']) }}) - # *[barrier=wood_fence] - if (u'barrier' in keys): + # *[man_made=well] + if (u'man_made' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'wood_fence')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'well')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"barrier=fence + fence_type=wood" - # fixAdd:"barrier=fence" - # fixAdd:"fence_type=wood" - err.append({'class': 9002001, 'subclass': 1412230714, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'barrier',u'fence'], - [u'fence_type',u'wood']]) - }}) + # suggestAlternative:"man_made=petroleum_well" + # suggestAlternative:"man_made=water_well" + err.append({'class': 9002001, 'subclass': 1740864107, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[highway=stile] - if (u'highway' in keys): + # *[amenity=dog_bin] + # *[amenity=dog_waste_bin] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'stile')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'dog_bin')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'dog_waste_bin')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"barrier=stile" - # fixAdd:"barrier=stile" - # fixRemove:"highway" - err.append({'class': 9002001, 'subclass': 1435678043, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"amenity=waste_basket + waste=dog_excrement + vending=excrement_bags" + # fixAdd:"amenity=waste_basket" + # fixAdd:"vending=excrement_bags" + # fixAdd:"waste=dog_excrement" + err.append({'class': 9002001, 'subclass': 2091877281, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'barrier',u'stile']]), - '-': ([ - u'highway']) + [u'amenity',u'waste_basket'], + [u'vending',u'excrement_bags'], + [u'waste',u'dog_excrement']]) }}) - # *[highway=incline] - if (u'highway' in keys): + # *[amenity=artwork] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'incline')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'artwork')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"incline" - err.append({'class': 9002001, 'subclass': 765169083, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"tourism=artwork" + # fixRemove:"amenity" + # fixAdd:"tourism=artwork" + err.append({'class': 9002001, 'subclass': 728429076, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'tourism',u'artwork']]), + '-': ([ + u'amenity']) + }}) - # *[highway=incline_steep] - if (u'highway' in keys): + # *[amenity=community_center] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'incline_steep')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'community_center')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"incline" - err.append({'class': 9002001, 'subclass': 1966772390, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"amenity=community_centre" + # fixAdd:"amenity=community_centre" + err.append({'class': 9002001, 'subclass': 690512681, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'amenity',u'community_centre']]) + }}) - # *[highway=unsurfaced] - if (u'highway' in keys): + # *[man_made=cut_line] + if (u'man_made' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'unsurfaced')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'cut_line')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"highway=* + surface=unpaved" - # fixAdd:"highway=road" - # fixAdd:"surface=unpaved" - err.append({'class': 9002001, 'subclass': 20631498, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"man_made=cutline" + # fixAdd:"man_made=cutline" + err.append({'class': 9002001, 'subclass': 1008752382, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'highway',u'road'], - [u'surface',u'unpaved']]) + [u'man_made',u'cutline']]) }}) - # *[landuse=wood] - if (u'landuse' in keys): + # *[amenity=park] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'wood')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'park')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"landuse=forest" - # suggestAlternative:"natural=wood" - err.append({'class': 9002001, 'subclass': 469903103, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[natural=marsh] - if (u'natural' in keys): - match = False + # suggestAlternative:"leisure=park" + # fixRemove:"amenity" + # fixAdd:"leisure=park" + err.append({'class': 9002001, 'subclass': 2085280194, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'leisure',u'park']]), + '-': ([ + u'amenity']) + }}) + + # *[amenity=hotel] + if (u'amenity' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'marsh')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'hotel')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"natural=wetland + wetland=marsh" - # fixAdd:"natural=wetland" - # fixAdd:"wetland=marsh" - err.append({'class': 9002001, 'subclass': 1459865523, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"tourism=hotel" + # fixRemove:"amenity" + # fixAdd:"tourism=hotel" + err.append({'class': 9002001, 'subclass': 1341786818, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'natural',u'wetland'], - [u'wetland',u'marsh']]) + [u'tourism',u'hotel']]), + '-': ([ + u'amenity']) }}) - # *[highway=byway] - if (u'highway' in keys): + # *[shop=window] + # *[shop=windows] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'byway')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'window')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - err.append({'class': 9002001, 'subclass': 1844620979, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[power_source] - if (u'power_source' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power_source')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'windows')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"generator:source" - err.append({'class': 9002001, 'subclass': 34751027, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"craft=window_construction" + # fixAdd:"craft=window_construction" + # fixRemove:"shop" + err.append({'class': 9002001, 'subclass': 532391183, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'craft',u'window_construction']]), + '-': ([ + u'shop']) + }}) - # *[power_rating] - if (u'power_rating' in keys): + # *[amenity=education] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power_rating')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'education')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"generator:output" - err.append({'class': 9002001, 'subclass': 904750343, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"amenity=college" + # suggestAlternative:"amenity=school" + # suggestAlternative:"amenity=university" + err.append({'class': 9002001, 'subclass': 796960259, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[shop=antique] + # *[shop=gallery] if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'antique')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'gallery')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=antiques" - # fixAdd:"shop=antiques" - err.append({'class': 9002001, 'subclass': 596668979, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"shop=art" + # fixAdd:"shop=art" + err.append({'class': 9002001, 'subclass': 1319611546, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'shop',u'antiques']]) + [u'shop',u'art']]) }}) - # *[shop=bags] - if (u'shop' in keys): + # *[shop=gambling] + # *[leisure=gambling] + if (u'leisure' in keys) or (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'bags')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'gambling')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'gambling')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=bag" - # fixAdd:"shop=bag" - err.append({'class': 9002001, 'subclass': 1709003584, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'shop',u'bag']]) - }}) + # suggestAlternative:"amenity=casino" + # suggestAlternative:"amenity=gambling" + # suggestAlternative:"leisure=amusement_arcade" + # suggestAlternative:"shop=bookmaker" + # suggestAlternative:"shop=lottery" + err.append({'class': 9002001, 'subclass': 1955724853, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[shop=fashion] - if (u'shop' in keys): + # *[office=real_estate] + # *[office=real_estate_agent] + if (u'office' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'fashion')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'office') == mapcss._value_capture(capture_tags, 0, u'real_estate')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'office') == mapcss._value_capture(capture_tags, 0, u'real_estate_agent')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=clothes" - # fixAdd:"shop=clothes" - err.append({'class': 9002001, 'subclass': 985619804, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"office=estate_agent" + # fixAdd:"office=estate_agent" + err.append({'class': 9002001, 'subclass': 2027311706, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'shop',u'clothes']]) + [u'office',u'estate_agent']]) }}) - # *[shop=organic] + # *[shop=glass] if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'organic')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'glass')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=* + organic=only" - # suggestAlternative:"shop=* + organic=yes" - err.append({'class': 9002001, 'subclass': 1959365145, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"craft=glaziery" + # suggestAlternative:"shop=glaziery" + err.append({'class': 9002001, 'subclass': 712020531, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[shop=pets] - if (u'shop' in keys): + # *[amenity=proposed] + # *[amenity=proposed] + # *[amenity=disused] + # *[shop=disused] + # *[highway=abandoned] + # *[historic=abandoned] + if (u'amenity' in keys) or (u'highway' in keys) or (u'historic' in keys) or (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'pets')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'proposed')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=pet" - # fixAdd:"shop=pet" - err.append({'class': 9002001, 'subclass': 290270098, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'shop',u'pet']]) - }}) - - # *[shop=pharmacy] - if (u'shop' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'pharmacy')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'proposed')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'disused')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'disused')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'abandoned')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'historic') == mapcss._value_capture(capture_tags, 0, u'abandoned')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=pharmacy" - # fixChangeKey:"shop => amenity" - err.append({'class': 9002001, 'subclass': 350722657, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'amenity', mapcss.tag(tags, u'shop')]]), - '-': ([ - u'shop']) - }}) + # throwWarning:tr("{0} is deprecated. Use the {1}: key prefix instead.","{0.tag}","{0.value}") + err.append({'class': 9002001, 'subclass': 1169228401, 'text': mapcss.tr(u'{0} is deprecated. Use the {1}: key prefix instead.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) - # *[bicycle_parking=sheffield] - if (u'bicycle_parking' in keys): + # *[amenity=swimming_pool] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bicycle_parking') == mapcss._value_capture(capture_tags, 0, u'sheffield')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'swimming_pool')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"bicycle_parking=stands" - # fixAdd:"bicycle_parking=stands" - err.append({'class': 9002001, 'subclass': 718874663, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"leisure=swimming_pool" + # fixChangeKey:"amenity => leisure" + err.append({'class': 9002001, 'subclass': 2012807801, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'bicycle_parking',u'stands']]) + [u'leisure', mapcss.tag(tags, u'amenity')]]), + '-': ([ + u'amenity']) }}) - # *[amenity=emergency_phone] + # *[amenity=sauna] if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'emergency_phone')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'sauna')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"emergency=phone" - # fixRemove:"amenity" - # fixAdd:"emergency=phone" - err.append({'class': 9002001, 'subclass': 1108230656, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"leisure=sauna" + # fixChangeKey:"amenity => leisure" + err.append({'class': 9002001, 'subclass': 1450116742, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'emergency',u'phone']]), + [u'leisure', mapcss.tag(tags, u'amenity')]]), '-': ([ u'amenity']) }}) - # *[sport=gaelic_football] - if (u'sport' in keys): + # *[/^[^t][^i][^g].+_[0-9]$/][!/^note_[0-9]$/][!/^description_[0-9]$/] + if True: match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'gaelic_football')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_300dfa36) and not mapcss._tag_capture(capture_tags, 1, tags, self.re_3185ac6d) and not mapcss._tag_capture(capture_tags, 2, tags, self.re_6d27b157)) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"sport=gaelic_games" - # fixAdd:"sport=gaelic_games" - err.append({'class': 9002001, 'subclass': 1768681881, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'sport',u'gaelic_games']]) - }}) + # group:tr("questionable key (ending with a number)") + # throwWarning:tr("{0}","{0.key}") + # assertNoMatch:"way description_3=foo" + # assertMatch:"way name_1=foo" + # assertNoMatch:"way note_2=foo" + # assertNoMatch:"way tiger:name_base_1=bar" + err.append({'class': 9002014, 'subclass': 2081989305, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[power=station] - if (u'power' in keys): + # *[sport=skating] + if (u'sport' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'station')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'skating')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"power=plant" - # suggestAlternative:"power=substation" - err.append({'class': 9002001, 'subclass': 52025933, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"sport=ice_skating" + # suggestAlternative:"sport=roller_skating" + err.append({'class': 9002001, 'subclass': 170699177, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[power=sub_station] - if (u'power' in keys): + # way[barrier=wall][type=noise_barrier][!wall] + # way[barrier=wall][type=noise_barrier][wall=noise_barrier] + if (u'barrier' in keys and u'type' in keys) or (u'barrier' in keys and u'type' in keys and u'wall' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'sub_station')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'wall') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'noise_barrier') and not mapcss._tag_capture(capture_tags, 2, tags, u'wall')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'wall') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'noise_barrier') and mapcss._tag_capture(capture_tags, 2, tags, u'wall') == mapcss._value_capture(capture_tags, 2, u'noise_barrier')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"power=substation" - # fixAdd:"power=substation" - err.append({'class': 9002001, 'subclass': 1423074682, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{1.tag}") + # suggestAlternative:"wall=noise_barrier" + # fixChangeKey:"type => wall" + err.append({'class': 9002001, 'subclass': 1513752031, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{1.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'power',u'substation']]) + [u'wall', mapcss.tag(tags, u'type')]]), + '-': ([ + u'type']) }}) - # *[generator:method=dam] - if (u'generator:method' in keys): + # way[barrier=wall][type=noise_barrier][wall][wall!=noise_barrier] + if (u'barrier' in keys and u'type' in keys and u'wall' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') == mapcss._value_capture(capture_tags, 0, u'dam')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'wall') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'noise_barrier') and mapcss._tag_capture(capture_tags, 2, tags, u'wall') and mapcss._tag_capture(capture_tags, 3, tags, u'wall') != mapcss._value_const_capture(capture_tags, 3, u'noise_barrier', u'noise_barrier')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"generator:method=water-storage" - # fixAdd:"generator:method=water-storage" - err.append({'class': 9002001, 'subclass': 248819368, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'generator:method',u'water-storage']]) - }}) + # throwWarning:tr("{0} is deprecated","{1.tag}") + # suggestAlternative:"wall=noise_barrier" + err.append({'class': 9002001, 'subclass': 2130256462, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) - # *[generator:method=pumped-storage] - if (u'generator:method' in keys): + # *[amenity=public_building] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') == mapcss._value_capture(capture_tags, 0, u'pumped-storage')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'public_building')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"generator:method=water-pumped-storage" - # fixAdd:"generator:method=water-pumped-storage" - err.append({'class': 9002001, 'subclass': 93454158, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'generator:method',u'water-pumped-storage']]) - }}) + # suggestAlternative:"..." + # suggestAlternative:"amenity=community_centre" + # suggestAlternative:"amenity=hospital" + # suggestAlternative:"amenity=townhall" + # suggestAlternative:"building=hospital" + # suggestAlternative:"building=public" + # suggestAlternative:"leisure=sports_centre" + # suggestAlternative:"office=government" + err.append({'class': 9002001, 'subclass': 1295642010, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[generator:method=pumping] - if (u'generator:method' in keys): + # *[vending=news_papers] + if (u'vending' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') == mapcss._value_capture(capture_tags, 0, u'pumping')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'vending') == mapcss._value_capture(capture_tags, 0, u'news_papers')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"generator:method=water-pumped-storage" - # fixAdd:"generator:method=water-pumped-storage" - err.append({'class': 9002001, 'subclass': 2115673716, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"vending=newspapers" + # fixAdd:"vending=newspapers" + err.append({'class': 9002001, 'subclass': 1133820292, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'generator:method',u'water-pumped-storage']]) + [u'vending',u'newspapers']]) }}) - # *[fence_type=chain] - if (u'fence_type' in keys): + # *[service=drive_through] + if (u'service' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fence_type') == mapcss._value_capture(capture_tags, 0, u'chain')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'service') == mapcss._value_capture(capture_tags, 0, u'drive_through')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"barrier=chain" - # suggestAlternative:"barrier=fence + fence_type=chain_link" - err.append({'class': 9002001, 'subclass': 19409288, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"service=drive-through" + # fixAdd:"service=drive-through" + err.append({'class': 9002001, 'subclass': 283545650, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'service',u'drive-through']]) + }}) - # *[building=entrance] - if (u'building' in keys): + # way[highway=service][service][service!~/^(alley|drive-through|drive_through|driveway|emergency_access|parking_aisle|rest_area|yes)$/] + # way[railway=rail][service][service!~/^(crossover|siding|spur|yard)$/] + # way[waterway=canal][service][service!~/^(irrigation|transportation|water_power)$/] + if (u'highway' in keys and u'service' in keys) or (u'railway' in keys and u'service' in keys) or (u'service' in keys and u'waterway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'entrance')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'service') and mapcss._tag_capture(capture_tags, 1, tags, u'service') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_05edd24e, u'^(alley|drive-through|drive_through|driveway|emergency_access|parking_aisle|rest_area|yes)$'), mapcss._tag_capture(capture_tags, 2, tags, u'service'))) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'railway') == mapcss._value_capture(capture_tags, 0, u'rail') and mapcss._tag_capture(capture_tags, 1, tags, u'service') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_2fd4cdcf, u'^(crossover|siding|spur|yard)$'), mapcss._tag_capture(capture_tags, 2, tags, u'service'))) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'canal') and mapcss._tag_capture(capture_tags, 1, tags, u'service') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_7a045a17, u'^(irrigation|transportation|water_power)$'), mapcss._tag_capture(capture_tags, 2, tags, u'service'))) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"entrance" - err.append({'class': 9002001, 'subclass': 306662985, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("The key {0} has an uncommon value.","{1.key}") + err.append({'class': 9002017, 'subclass': 275832859, 'text': mapcss.tr(u'The key {0} has an uncommon value.', mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) - # *[board_type=board] - if (u'board_type' in keys): + # *[name:botanical] + if (u'name:botanical' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'board_type') == mapcss._value_capture(capture_tags, 0, u'board')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name:botanical')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # fixRemove:"board_type" - err.append({'class': 9002001, 'subclass': 1150949316, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '-': ([ - u'board_type']) - }}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"species" + err.append({'class': 9002001, 'subclass': 1061429000, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[man_made=measurement_station] - if (u'man_made' in keys): + # *[shop=souvenir] + # *[shop=souvenirs] + # *[shop=souveniers] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'measurement_station')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'souvenir')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'souvenirs')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'souveniers')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"man_made=monitoring_station" - # fixAdd:"man_made=monitoring_station" - err.append({'class': 9002001, 'subclass': 700465123, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"shop=gift" + # fixAdd:"shop=gift" + err.append({'class': 9002001, 'subclass': 1794702946, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'man_made',u'monitoring_station']]) + [u'shop',u'gift']]) }}) - # *[measurement=water_level] - if (u'measurement' in keys): + # *[vending=animal_food] + if (u'vending' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'measurement') == mapcss._value_capture(capture_tags, 0, u'water_level')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'vending') == mapcss._value_capture(capture_tags, 0, u'animal_food')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"monitoring:water_level=yes" - # fixRemove:"measurement" - # fixAdd:"monitoring:water_level=yes" - err.append({'class': 9002001, 'subclass': 634647702, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"vending=animal_feed" + # fixAdd:"vending=animal_feed" + err.append({'class': 9002001, 'subclass': 1077411296, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'monitoring:water_level',u'yes']]), - '-': ([ - u'measurement']) + [u'vending',u'animal_feed']]) }}) - # *[measurement=weather] - if (u'measurement' in keys): + # way[highway=emergency_access_point][phone][!emergency_telephone_code] + if (u'highway' in keys and u'phone' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'measurement') == mapcss._value_capture(capture_tags, 0, u'weather')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'emergency_access_point') and mapcss._tag_capture(capture_tags, 1, tags, u'phone') and not mapcss._tag_capture(capture_tags, 2, tags, u'emergency_telephone_code')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"monitoring:weather=yes" - # fixRemove:"measurement" - # fixAdd:"monitoring:weather=yes" - err.append({'class': 9002001, 'subclass': 336627227, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated for {1}","{1.key}","{0.tag}") + # suggestAlternative:"emergency_telephone_code" + # fixChangeKey:"phone => emergency_telephone_code" + err.append({'class': 9002001, 'subclass': 904792316, 'text': mapcss.tr(u'{0} is deprecated for {1}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'monitoring:weather',u'yes']]), + [u'emergency_telephone_code', mapcss.tag(tags, u'phone')]]), '-': ([ - u'measurement']) + u'phone']) }}) - # *[measurement=seismic] - if (u'measurement' in keys): + # way[highway=emergency_access_point][phone=*emergency_telephone_code] + if (u'highway' in keys and u'phone' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'measurement') == mapcss._value_capture(capture_tags, 0, u'seismic')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'emergency_access_point') and mapcss._tag_capture(capture_tags, 1, tags, u'phone') == mapcss._value_capture(capture_tags, 1, mapcss.tag(tags, u'emergency_telephone_code'))) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"monitoring:seismic_activity=yes" - # fixRemove:"measurement" - # fixAdd:"monitoring:seismic_activity=yes" - err.append({'class': 9002001, 'subclass': 1402131289, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'monitoring:seismic_activity',u'yes']]), + # throwWarning:tr("{0} is deprecated for {1}","{1.key}","{0.tag}") + # suggestAlternative:"emergency_telephone_code" + # fixRemove:"phone" + err.append({'class': 9002001, 'subclass': 3132845, 'text': mapcss.tr(u'{0} is deprecated for {1}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '-': ([ - u'measurement']) + u'phone']) }}) - # *[monitoring:river_level] - if (u'monitoring:river_level' in keys): + # way[highway=emergency_access_point][phone][emergency_telephone_code][phone!=*emergency_telephone_code] + if (u'emergency_telephone_code' in keys and u'highway' in keys and u'phone' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'monitoring:river_level')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'emergency_access_point') and mapcss._tag_capture(capture_tags, 1, tags, u'phone') and mapcss._tag_capture(capture_tags, 2, tags, u'emergency_telephone_code') and mapcss._tag_capture(capture_tags, 3, tags, u'phone') != mapcss._value_capture(capture_tags, 3, mapcss.tag(tags, u'emergency_telephone_code'))) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"monitoring:water_level" - # fixChangeKey:"monitoring:river_level => monitoring:water_level" - err.append({'class': 9002001, 'subclass': 264907924, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'monitoring:water_level', mapcss.tag(tags, u'monitoring:river_level')]]), - '-': ([ - u'monitoring:river_level']) - }}) + # throwWarning:tr("{0} is deprecated for {1}","{1.key}","{0.tag}") + # suggestAlternative:"emergency_telephone_code" + err.append({'class': 9002001, 'subclass': 144379729, 'text': mapcss.tr(u'{0} is deprecated for {1}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[stay] - if (u'stay' in keys): + # way[tracktype=1] + if (u'tracktype' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'stay')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tracktype') == mapcss._value_capture(capture_tags, 0, 1)) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"maxstay" - # fixChangeKey:"stay => maxstay" - err.append({'class': 9002001, 'subclass': 787370129, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + # group:tr("misspelled value") + # throwError:tr("{0}","{0.tag}") + # suggestAlternative:"tracktype=grade1" + # fixAdd:"tracktype=grade1" + err.append({'class': 9002018, 'subclass': 823078782, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'maxstay', mapcss.tag(tags, u'stay')]]), - '-': ([ - u'stay']) + [u'tracktype',u'grade1']]) }}) - # *[emergency=aed] - if (u'emergency' in keys): + # way[tracktype=2] + if (u'tracktype' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'emergency') == mapcss._value_capture(capture_tags, 0, u'aed')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tracktype') == mapcss._value_capture(capture_tags, 0, 2)) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"emergency=defibrillator" - # fixAdd:"emergency=defibrillator" - err.append({'class': 9002001, 'subclass': 707111885, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # group:tr("misspelled value") + # throwError:tr("{0}","{0.tag}") + # suggestAlternative:"tracktype=grade2" + # fixAdd:"tracktype=grade2" + err.append({'class': 9002018, 'subclass': 652259155, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'emergency',u'defibrillator']]) + [u'tracktype',u'grade2']]) }}) - # *[day_on][!restriction] - # *[day_off][!restriction] - # *[date_on][!restriction] - # *[date_off][!restriction] - # *[hour_on][!restriction] - # *[hour_off][!restriction] - if (u'date_off' in keys) or (u'date_on' in keys) or (u'day_off' in keys) or (u'day_on' in keys) or (u'hour_off' in keys) or (u'hour_on' in keys): + # way[tracktype=3] + if (u'tracktype' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'day_on') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'day_off') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'date_on') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'date_off') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'hour_on') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'hour_off') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tracktype') == mapcss._value_capture(capture_tags, 0, 3)) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"*:conditional" - err.append({'class': 9002001, 'subclass': 294264920, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # group:tr("misspelled value") + # throwError:tr("{0}","{0.tag}") + # suggestAlternative:"tracktype=grade3" + # fixAdd:"tracktype=grade3" + err.append({'class': 9002018, 'subclass': 1624412111, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'tracktype',u'grade3']]) + }}) - # *[access=designated] - if (u'access' in keys): + # way[tracktype=4] + if (u'tracktype' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'designated')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tracktype') == mapcss._value_capture(capture_tags, 0, 4)) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("''{0}'' is meaningless, use more specific tags, e.g. ''{1}''","access=designated","bicycle=designated") - err.append({'class': 9002002, 'subclass': 2057594338, 'text': mapcss.tr(u'\'\'{0}\'\' is meaningless, use more specific tags, e.g. \'\'{1}\'\'', u'access=designated', u'bicycle=designated')}) + # group:tr("misspelled value") + # throwError:tr("{0}","{0.tag}") + # suggestAlternative:"tracktype=grade4" + # fixAdd:"tracktype=grade4" + err.append({'class': 9002018, 'subclass': 808384986, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'tracktype',u'grade4']]) + }}) - # *[access=official] - if (u'access' in keys): + # way[tracktype=5] + if (u'tracktype' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'official')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tracktype') == mapcss._value_capture(capture_tags, 0, 5)) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("''{0}'' does not specify the official mode of transportation, use ''{1}'' for example","access=official","bicycle=official") - err.append({'class': 9002003, 'subclass': 1909133836, 'text': mapcss.tr(u'\'\'{0}\'\' does not specify the official mode of transportation, use \'\'{1}\'\' for example', u'access=official', u'bicycle=official')}) + # group:tr("misspelled value") + # throwError:tr("{0}","{0.tag}") + # suggestAlternative:"tracktype=grade5" + # fixAdd:"tracktype=grade5" + err.append({'class': 9002018, 'subclass': 1050276122, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'tracktype',u'grade5']]) + }}) - # *[fixme=yes] - # *[FIXME=yes] - if (u'FIXME' in keys) or (u'fixme' in keys): + # way[tracktype][tracktype!~/^(1|2|3|4|5|grade1|grade2|grade3|grade4|grade5)$/] + if (u'tracktype' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fixme') == mapcss._value_capture(capture_tags, 0, u'yes')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'FIXME') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tracktype') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_047d5648, u'^(1|2|3|4|5|grade1|grade2|grade3|grade4|grade5)$'), mapcss._tag_capture(capture_tags, 1, tags, u'tracktype'))) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0}={1} is unspecific. Instead of ''{1}'' please give more information about what exactly should be fixed.","{0.key}","{0.value}") - err.append({'class': 9002004, 'subclass': 136657482, 'text': mapcss.tr(u'{0}={1} is unspecific. Instead of \'\'{1}\'\' please give more information about what exactly should be fixed.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) + # throwError:tr("wrong value: {0}","{0.tag}") + # suggestAlternative:"tracktype=grade1" + # suggestAlternative:"tracktype=grade2" + # suggestAlternative:"tracktype=grade3" + # suggestAlternative:"tracktype=grade4" + # suggestAlternative:"tracktype=grade5" + err.append({'class': 9002019, 'subclass': 1665196665, 'text': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[name][name=~/^(?i)fixme$/] - if (u'name' in keys): + # *[amenity=hunting_stand][lock=yes] + # *[amenity=hunting_stand][lock=no] + if (u'amenity' in keys and u'lock' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_1f92073a), mapcss._tag_capture(capture_tags, 1, tags, u'name'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'hunting_stand') and mapcss._tag_capture(capture_tags, 1, tags, u'lock') == mapcss._value_capture(capture_tags, 1, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'hunting_stand') and mapcss._tag_capture(capture_tags, 1, tags, u'lock') == mapcss._value_capture(capture_tags, 1, u'no')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("Wrong usage of {0} tag. Remove {1}, because it is clear that the name is missing even without an additional tag.","{0.key}","{0.tag}") - # fixRemove:"name" - err.append({'class': 9002005, 'subclass': 642340557, 'text': mapcss.tr(u'Wrong usage of {0} tag. Remove {1}, because it is clear that the name is missing even without an additional tag.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated for {1}","{1.key}","{0.tag}") + # suggestAlternative:"lockable" + # fixChangeKey:"lock => lockable" + err.append({'class': 9002001, 'subclass': 1939599742, 'text': mapcss.tr(u'{0} is deprecated for {1}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'lockable', mapcss.tag(tags, u'lock')]]), '-': ([ - u'name']) + u'lock']) }}) - # *[note][note=~/^(?i)fixme$/] - if (u'note' in keys): + # *[amenity=advertising][!advertising] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'note') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_1f92073a), mapcss._tag_capture(capture_tags, 1, tags, u'note'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'advertising') and not mapcss._tag_capture(capture_tags, 1, tags, u'advertising')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0} is unspecific. Instead use the key fixme with the information what exactly should be fixed in the value of fixme.","{0.tag}") - err.append({'class': 9002006, 'subclass': 1243120287, 'text': mapcss.tr(u'{0} is unspecific. Instead use the key fixme with the information what exactly should be fixed in the value of fixme.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"advertising=*" + err.append({'class': 9002001, 'subclass': 1696784412, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[type=broad_leaved] - # *[type=broad_leafed] - if (u'type' in keys): + # *[amenity=advertising][advertising] + if (u'advertising' in keys and u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'broad_leaved')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'broad_leafed')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'advertising') and mapcss._tag_capture(capture_tags, 1, tags, u'advertising')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leaf_type=broadleaved" - # fixAdd:"leaf_type=broadleaved" - # fixRemove:"{0.key}" - err.append({'class': 9002001, 'subclass': 293968062, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'leaf_type',u'broadleaved']]), + # suggestAlternative:"advertising=*" + # fixRemove:"amenity" + err.append({'class': 9002001, 'subclass': 1538706366, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '-': ([ - mapcss._tag_uncapture(capture_tags, u'{0.key}')]) + u'amenity']) }}) - # *[wood=coniferous] - # *[type=coniferous] - # *[type=conifer] - if (u'type' in keys) or (u'wood' in keys): + # way[direction=up][incline=up] + # way[direction=down][incline=down] + # way[direction=up][!incline] + # way[direction=down][!incline] + if (u'direction' in keys) or (u'direction' in keys and u'incline' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'coniferous')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'direction') == mapcss._value_capture(capture_tags, 0, u'up') and mapcss._tag_capture(capture_tags, 1, tags, u'incline') == mapcss._value_capture(capture_tags, 1, u'up')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'coniferous')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'direction') == mapcss._value_capture(capture_tags, 0, u'down') and mapcss._tag_capture(capture_tags, 1, tags, u'incline') == mapcss._value_capture(capture_tags, 1, u'down')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'conifer')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'direction') == mapcss._value_capture(capture_tags, 0, u'up') and not mapcss._tag_capture(capture_tags, 1, tags, u'incline')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leaf_type=needleleaved" - # fixAdd:"leaf_type=needleleaved" - # fixRemove:"{0.key}" - err.append({'class': 9002001, 'subclass': 50517650, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'leaf_type',u'needleleaved']]), - '-': ([ - mapcss._tag_uncapture(capture_tags, u'{0.key}')]) - }}) - - # *[wood=mixed] - if (u'wood' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'mixed')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'direction') == mapcss._value_capture(capture_tags, 0, u'down') and not mapcss._tag_capture(capture_tags, 1, tags, u'incline')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leaf_type=mixed" - # fixAdd:"leaf_type=mixed" - # fixRemove:"wood" - err.append({'class': 9002001, 'subclass': 235914603, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"incline" + # fixChangeKey:"direction => incline" + err.append({'class': 9002001, 'subclass': 1707030473, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'leaf_type',u'mixed']]), + [u'incline', mapcss.tag(tags, u'direction')]]), '-': ([ - u'wood']) + u'direction']) }}) - # *[wood=evergreen] - # *[type=evergreen] - if (u'type' in keys) or (u'wood' in keys): + # way[direction=up][incline][incline!=up] + # way[direction=down][incline][incline!=down] + if (u'direction' in keys and u'incline' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'evergreen')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'direction') == mapcss._value_capture(capture_tags, 0, u'up') and mapcss._tag_capture(capture_tags, 1, tags, u'incline') and mapcss._tag_capture(capture_tags, 2, tags, u'incline') != mapcss._value_const_capture(capture_tags, 2, u'up', u'up')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'evergreen')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'direction') == mapcss._value_capture(capture_tags, 0, u'down') and mapcss._tag_capture(capture_tags, 1, tags, u'incline') and mapcss._tag_capture(capture_tags, 2, tags, u'incline') != mapcss._value_const_capture(capture_tags, 2, u'down', u'down')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leaf_cycle=evergreen" - # fixAdd:"leaf_cycle=evergreen" - # fixRemove:"{0.key}" - err.append({'class': 9002001, 'subclass': 747964532, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'leaf_cycle',u'evergreen']]), - '-': ([ - mapcss._tag_uncapture(capture_tags, u'{0.key}')]) - }}) + # suggestAlternative:"incline" + err.append({'class': 9002001, 'subclass': 937812227, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[type=deciduous] - # *[type=deciduos] - if (u'type' in keys): + # *[building=true] + # *[building="*"] + # *[building=Y] + # *[building=y] + # *[building=1] + if (u'building' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'deciduous')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'true')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'deciduos')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'*')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'Y')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'y')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, 1)) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leaf_cycle=deciduous" - # fixAdd:"leaf_cycle=deciduous" - # fixRemove:"type" - err.append({'class': 9002001, 'subclass': 591116099, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # group:tr("misspelled value") + # throwError:tr("{0}","{0.tag}") + # suggestAlternative:"building=yes" + # fixAdd:"building=yes" + err.append({'class': 9002018, 'subclass': 596818855, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'leaf_cycle',u'deciduous']]), - '-': ([ - u'type']) + [u'building',u'yes']]) }}) - # *[wood=deciduous] - if (u'wood' in keys): + # *[building=abandoned] + # *[building=address] + # *[building=bing] + # *[building=collapsed] + # *[building=damaged] + # *[building=demolished] + # *[building=disused] + # *[building=fixme] + # *[building=occupied] + # *[building=other] + # *[building=razed] + # *[building=unclassified] + # *[building=undefined] + # *[building=unknown] + # *[building=unidentified] + if (u'building' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'deciduous')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'abandoned')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leaf_type + leaf_cycle" - err.append({'class': 9002001, 'subclass': 1100223594, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[natural=land] - if (u'natural' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'land')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'address')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated. Please use instead a multipolygon.","{0.tag}") + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'bing')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'collapsed')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'damaged')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'demolished')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'disused')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'fixme')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'occupied')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'other')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'razed')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'unclassified')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'undefined')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'unknown')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'unidentified')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is not a building type.","{0.tag}") + err.append({'class': 9002001, 'subclass': 159699040, 'text': mapcss.tr(u'{0} is not a building type.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # way[water=salt] + # way[water=salt_pool] + # way[water=salt_panne] + # way[water=salt_pond] + if (u'water' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'salt')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'salt_pool')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'salt_panne')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'salt_pond')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"landuse=salt_pond" + # suggestAlternative:"salt=yes" + err.append({'class': 9002001, 'subclass': 403932956, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # way[water=tidal] + if (u'water' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'tidal')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"tidal=yes" + # fixAdd:"tidal=yes" + # fixRemove:"water" + err.append({'class': 9002001, 'subclass': 1201030806, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'tidal',u'yes']]), + '-': ([ + u'water']) + }}) + + # *[amenity=toilet] + if (u'amenity' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'toilet')) + except mapcss.RuleAbort: pass + if match: + # group:tr("misspelled value") + # throwError:tr("{0}","{0.tag}") + # suggestAlternative:"amenity=toilets" + # fixAdd:"amenity=toilets" + err.append({'class': 9002018, 'subclass': 440018606, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'amenity',u'toilets']]) + }}) + + # way[power=busbar] + if (u'power' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'busbar')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"power=line + line=busbar" + # fixAdd:"line=busbar" + # fixAdd:"power=line" + err.append({'class': 9002001, 'subclass': 2001565557, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'line',u'busbar'], + [u'power',u'line']]) + }}) + + # *[man_made=MDF] + # *[man_made=telephone_exchange] + if (u'man_made' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'MDF')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'telephone_exchange')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"telecom=exchange" + # fixRemove:"man_made" + # fixAdd:"telecom=exchange" + err.append({'class': 9002001, 'subclass': 634698090, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'telecom',u'exchange']]), + '-': ([ + u'man_made']) + }}) + + # *[building=central_office] + if (u'building' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'central_office')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"telecom=exchange" + # fixAdd:"building=yes" + # fixAdd:"telecom=exchange" + err.append({'class': 9002001, 'subclass': 1091970270, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'building',u'yes'], + [u'telecom',u'exchange']]) + }}) + + # *[telecom=central_office] + if (u'telecom' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'telecom') == mapcss._value_capture(capture_tags, 0, u'central_office')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"telecom=exchange" + # fixAdd:"telecom=exchange" + err.append({'class': 9002001, 'subclass': 1503278830, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'telecom',u'exchange']]) + }}) + + # *[natural=waterfall] + if (u'natural' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'waterfall')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"waterway=waterfall" + # fixChangeKey:"natural => waterway" + err.append({'class': 9002001, 'subclass': 764711734, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'waterway', mapcss.tag(tags, u'natural')]]), + '-': ([ + u'natural']) + }}) + + # *[religion=unitarian] + if (u'religion' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'religion') == mapcss._value_capture(capture_tags, 0, u'unitarian')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"religion=unitarian_universalist" + # fixAdd:"religion=unitarian_universalist" + err.append({'class': 9002001, 'subclass': 9227331, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'religion',u'unitarian_universalist']]) + }}) + + # *[shop=shopping_centre] + if (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'shopping_centre')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=mall" + # fixAdd:"shop=mall" + err.append({'class': 9002001, 'subclass': 1448390566, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop',u'mall']]) + }}) + + # *[is_in] + # way[/^is_in:.*$/] + if True: + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'is_in')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_493fd1a6)) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # fixRemove:"{0.key}" + err.append({'class': 9002001, 'subclass': 1865068642, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '-': ([ + mapcss._tag_uncapture(capture_tags, u'{0.key}')]) + }}) + + # *[sport=football] + if (u'sport' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'football')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"sport=american_football" + # suggestAlternative:"sport=australian_football" + # suggestAlternative:"sport=canadian_football" + # suggestAlternative:"sport=gaelic_games" + # suggestAlternative:"sport=rugby_league" + # suggestAlternative:"sport=rugby_union" + # suggestAlternative:"sport=soccer" + err.append({'class': 9002001, 'subclass': 73038577, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[leisure=common] + if (u'leisure' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'common')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"designation=common" + # suggestAlternative:"landuse=*" + # suggestAlternative:"leisure=*" + err.append({'class': 9002001, 'subclass': 157636301, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[cuisine=vegan] + # *[cuisine=vegetarian] + if (u'cuisine' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'cuisine') == mapcss._value_capture(capture_tags, 0, u'vegan')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'cuisine') == mapcss._value_capture(capture_tags, 0, u'vegetarian')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # suggestAlternative:concat("diet:","{0.value}","=only") + # suggestAlternative:concat("diet:","{0.value}","=yes") + # throwWarning:tr("{0} is deprecated","{0.tag}") + err.append({'class': 9002001, 'subclass': 43604574, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[kitchen_hours] + if (u'kitchen_hours' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kitchen_hours')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"opening_hours:kitchen" + # fixChangeKey:"kitchen_hours => opening_hours:kitchen" + err.append({'class': 9002001, 'subclass': 1088306802, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'opening_hours:kitchen', mapcss.tag(tags, u'kitchen_hours')]]), + '-': ([ + u'kitchen_hours']) + }}) + + # *[shop=money_transfer] + if (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'money_transfer')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"amenity=money_transfer" + # fixChangeKey:"shop => amenity" + err.append({'class': 9002001, 'subclass': 1664997936, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'amenity', mapcss.tag(tags, u'shop')]]), + '-': ([ + u'shop']) + }}) + + # *[contact:google_plus] + if (u'contact:google_plus' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'contact:google_plus')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # fixRemove:"contact:google_plus" + err.append({'class': 9002001, 'subclass': 1869461154, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'contact:google_plus']) + }}) + + # *[amenity=garages] + # *[amenity=garage] + if (u'amenity' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'garages')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'garage')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # suggestAlternative:concat("building=","{0.value}") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"amenity=parking + parking=garage_boxes" + # suggestAlternative:"landuse=garages" + err.append({'class': 9002001, 'subclass': 863228118, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[shop=winery] + # *[amenity=winery] + if (u'amenity' in keys) or (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'winery')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'winery')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"craft=winery" + # suggestAlternative:"shop=wine" + err.append({'class': 9002001, 'subclass': 1773574987, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[amenity=youth_centre] + if (u'amenity' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'youth_centre')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"amenity=community_centre + community_centre=youth_centre" + # fixAdd:"amenity=community_centre" + # fixAdd:"community_centre=youth_centre" + err.append({'class': 9002001, 'subclass': 1284929085, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'amenity',u'community_centre'], + [u'community_centre',u'youth_centre']]) + }}) + + # *[building:type][building=yes] + # *[building:type][!building] + if (u'building' in keys and u'building:type' in keys) or (u'building:type' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building:type') and mapcss._tag_capture(capture_tags, 1, tags, u'building') == mapcss._value_capture(capture_tags, 1, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building:type') and not mapcss._tag_capture(capture_tags, 1, tags, u'building')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"building" + # fixChangeKey:"building:type => building" + # assertNoMatch:"way building:type=church building=supermarket" + # assertMatch:"way building:type=church building=yes" + # assertMatch:"way building:type=church" + err.append({'class': 9002001, 'subclass': 1927794430, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'building', mapcss.tag(tags, u'building:type')]]), + '-': ([ + u'building:type']) + }}) + + # *[building:type][building][building!=yes] + if (u'building' in keys and u'building:type' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building:type') and mapcss._tag_capture(capture_tags, 1, tags, u'building') and mapcss._tag_capture(capture_tags, 2, tags, u'building') != mapcss._value_const_capture(capture_tags, 2, u'yes', u'yes')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"building" + # assertMatch:"way building:type=church building=supermarket" + # assertNoMatch:"way building:type=church building=yes" + # assertNoMatch:"way building:type=church" + err.append({'class': 9002001, 'subclass': 1133239698, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[escalator] + if (u'escalator' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'escalator')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"highway=steps + conveying=*" + err.append({'class': 9002001, 'subclass': 967271828, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[fenced] + if (u'fenced' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fenced')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"barrier=fence" + err.append({'class': 9002001, 'subclass': 1141285220, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[historic_name][!old_name] + if (u'historic_name' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'historic_name') and not mapcss._tag_capture(capture_tags, 1, tags, u'old_name')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"old_name" + # fixChangeKey:"historic_name => old_name" + err.append({'class': 9002001, 'subclass': 1034538127, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'old_name', mapcss.tag(tags, u'historic_name')]]), + '-': ([ + u'historic_name']) + }}) + + # *[historic_name][old_name] + if (u'historic_name' in keys and u'old_name' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'historic_name') and mapcss._tag_capture(capture_tags, 1, tags, u'old_name')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"old_name" + err.append({'class': 9002001, 'subclass': 30762614, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[landuse=field] + if (u'landuse' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'field')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"landuse=farmland" + # fixAdd:"landuse=farmland" + err.append({'class': 9002001, 'subclass': 426261497, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'landuse',u'farmland']]) + }}) + + # *[leisure=beach] + if (u'leisure' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'beach')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leisure=beach_resort" + # suggestAlternative:"natural=beach" + err.append({'class': 9002001, 'subclass': 1767286055, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[leisure=club] + if (u'leisure' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'club')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"club=*" + err.append({'class': 9002001, 'subclass': 1282397509, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[leisure=video_arcade] + if (u'leisure' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'video_arcade')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leisure=adult_gaming_centre" + # suggestAlternative:"leisure=amusement_arcade" + err.append({'class': 9002001, 'subclass': 1463909830, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[man_made=jetty] + if (u'man_made' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'jetty')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"man_made=pier" + # fixAdd:"man_made=pier" + err.append({'class': 9002001, 'subclass': 192707176, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'man_made',u'pier']]) + }}) + + # *[man_made=village_pump] + if (u'man_made' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'village_pump')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"man_made=water_well" + # fixAdd:"man_made=water_well" + err.append({'class': 9002001, 'subclass': 423232686, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'man_made',u'water_well']]) + }}) + + # *[man_made=water_tank] + if (u'man_made' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'water_tank')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"man_made=storage_tank + content=water" + # fixAdd:"content=water" + # fixAdd:"man_made=storage_tank" + err.append({'class': 9002001, 'subclass': 563629665, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'content',u'water'], + [u'man_made',u'storage_tank']]) + }}) + + # *[natural=moor] + if (u'natural' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'moor')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"landuse=meadow + meadow=agricultural" + # suggestAlternative:"natural=fell" + # suggestAlternative:"natural=grassland" + # suggestAlternative:"natural=heath" + # suggestAlternative:"natural=scrub" + # suggestAlternative:"natural=tundra" + # suggestAlternative:"natural=wetland" + err.append({'class': 9002001, 'subclass': 374637717, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[noexit=no][!fixme] + if (u'noexit' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'noexit') == mapcss._value_capture(capture_tags, 0, u'no') and not mapcss._tag_capture(capture_tags, 1, tags, u'fixme')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"fixme=continue" + # fixAdd:"fixme=continue" + # fixRemove:"noexit" + err.append({'class': 9002001, 'subclass': 647435126, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'fixme',u'continue']]), + '-': ([ + u'noexit']) + }}) + + # *[noexit=no][fixme] + if (u'fixme' in keys and u'noexit' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'noexit') == mapcss._value_capture(capture_tags, 0, u'no') and mapcss._tag_capture(capture_tags, 1, tags, u'fixme')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"fixme=continue" + err.append({'class': 9002001, 'subclass': 881828009, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[shop=dive] + if (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'dive')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=scuba_diving" + # fixAdd:"shop=scuba_diving" + err.append({'class': 9002001, 'subclass': 1582968978, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop',u'scuba_diving']]) + }}) + + # *[shop=furnace] + if (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'furnace')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"craft=plumber" + # suggestAlternative:"shop=fireplace" + err.append({'class': 9002001, 'subclass': 1155821104, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[sport=paragliding] + if (u'sport' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'paragliding')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"sport=free_flying" + # fixAdd:"sport=free_flying" + err.append({'class': 9002001, 'subclass': 1531788430, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'sport',u'free_flying']]) + }}) + + # *[tourism=bed_and_breakfast] + if (u'tourism' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tourism') == mapcss._value_capture(capture_tags, 0, u'bed_and_breakfast')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"tourism=guest_house + guest_house=bed_and_breakfast" + # fixAdd:"guest_house=bed_and_breakfast" + # fixAdd:"tourism=guest_house" + err.append({'class': 9002001, 'subclass': 954237438, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'guest_house',u'bed_and_breakfast'], + [u'tourism',u'guest_house']]) + }}) + + # *[diaper=yes] + # *[diaper=no] + if (u'diaper' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper') == mapcss._value_capture(capture_tags, 0, u'no')) + except mapcss.RuleAbort: pass + if match: + # setdiaper_checked + # group:tr("deprecated tagging") + # suggestAlternative:concat("changing_table=","{0.value}") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # fixChangeKey:"diaper => changing_table" + set_diaper_checked = True + err.append({'class': 9002001, 'subclass': 1957125311, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'changing_table', mapcss.tag(tags, u'diaper')]]), + '-': ([ + u'diaper']) + }}) + + # *[diaper][diaper=~/^[1-9][0-9]*$/] + if (u'diaper' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_0f294fdf), mapcss._tag_capture(capture_tags, 1, tags, u'diaper'))) + except mapcss.RuleAbort: pass + if match: + # setdiaper_checked + # group:tr("deprecated tagging") + # suggestAlternative:concat("changing_table=yes + changing_table:count=","{0.value}") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # fixAdd:"changing_table=yes" + # fixChangeKey:"diaper => changing_table:count" + set_diaper_checked = True + err.append({'class': 9002001, 'subclass': 2105051472, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'changing_table',u'yes'], + [u'changing_table:count', mapcss.tag(tags, u'diaper')]]), + '-': ([ + u'diaper']) + }}) + + # *[diaper=room] + if (u'diaper' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper') == mapcss._value_capture(capture_tags, 0, u'room')) + except mapcss.RuleAbort: pass + if match: + # setdiaper_checked + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"changing_table=dedicated_room" + # suggestAlternative:"changing_table=room" + set_diaper_checked = True + err.append({'class': 9002001, 'subclass': 883202329, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[diaper]!.diaper_checked + if (u'diaper' in keys): + match = False + if not match: + capture_tags = {} + try: match = (not set_diaper_checked and mapcss._tag_capture(capture_tags, 0, tags, u'diaper')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"changing_table" + err.append({'class': 9002001, 'subclass': 693675339, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[diaper:male=yes] + if (u'diaper:male' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:male') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if match: + # setdiaper___checked + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"changing_table:location=male_toilet" + # fixAdd:"changing_table:location=male_toilet" + # fixRemove:"diaper:male" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 799035479, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'changing_table:location',u'male_toilet']]), + '-': ([ + u'diaper:male']) + }}) + + # *[diaper:female=yes] + if (u'diaper:female' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:female') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if match: + # setdiaper___checked + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"changing_table:location=female_toilet" + # fixAdd:"changing_table:location=female_toilet" + # fixRemove:"diaper:female" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 1450901137, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'changing_table:location',u'female_toilet']]), + '-': ([ + u'diaper:female']) + }}) + + # *[diaper:unisex=yes] + if (u'diaper:unisex' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:unisex') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if match: + # setdiaper___checked + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"changing_table:location=unisex_toilet" + # fixAdd:"changing_table:location=unisex_toilet" + # fixRemove:"diaper:unisex" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 1460378712, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'changing_table:location',u'unisex_toilet']]), + '-': ([ + u'diaper:unisex']) + }}) + + # *[diaper:wheelchair=yes] + # *[diaper:wheelchair=no] + if (u'diaper:wheelchair' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:wheelchair') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:wheelchair') == mapcss._value_capture(capture_tags, 0, u'no')) + except mapcss.RuleAbort: pass + if match: + # setdiaper___checked + # group:tr("deprecated tagging") + # suggestAlternative:concat("changing_table:wheelchair=","{0.value}") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # fixChangeKey:"diaper:wheelchair => changing_table:wheelchair" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 1951967281, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'changing_table:wheelchair', mapcss.tag(tags, u'diaper:wheelchair')]]), + '-': ([ + u'diaper:wheelchair']) + }}) + + # *[diaper:fee=yes] + # *[diaper:fee=no] + if (u'diaper:fee' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:fee') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:fee') == mapcss._value_capture(capture_tags, 0, u'no')) + except mapcss.RuleAbort: pass + if match: + # setdiaper___checked + # group:tr("deprecated tagging") + # suggestAlternative:concat("changing_table:fee=","{0.value}") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # fixChangeKey:"diaper:fee => changing_table:fee" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 2008573526, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'changing_table:fee', mapcss.tag(tags, u'diaper:fee')]]), + '-': ([ + u'diaper:fee']) + }}) + + # *[/^diaper:/]!.diaper___checked + if True: + match = False + if not match: + capture_tags = {} + try: match = (not set_diaper___checked and mapcss._tag_capture(capture_tags, 0, tags, self.re_6029fe03)) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","diaper:*") + # suggestAlternative:"changing_table:*" + err.append({'class': 9002001, 'subclass': 26578864, 'text': mapcss.tr(u'{0} is deprecated', u'diaper:*')}) + + # *[changing_table][changing_table!~/^(yes|no|limited)$/] + if (u'changing_table' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'changing_table') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_787405b1, u'^(yes|no|limited)$'), mapcss._tag_capture(capture_tags, 1, tags, u'changing_table'))) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("wrong value: {0}","{0.tag}") + # suggestAlternative:"changing_table=limited" + # suggestAlternative:"changing_table=no" + # suggestAlternative:"changing_table=yes" + err.append({'class': 9002019, 'subclass': 1965225408, 'text': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[roof:shape=half_hipped] + if (u'roof:shape' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'roof:shape') == mapcss._value_capture(capture_tags, 0, u'half_hipped')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"roof:shape=half-hipped" + # fixAdd:"roof:shape=half-hipped" + err.append({'class': 9002001, 'subclass': 1548347123, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'roof:shape',u'half-hipped']]) + }}) + + # *[bridge_name] + if (u'bridge_name' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge_name')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"bridge:name" + # fixChangeKey:"bridge_name => bridge:name" + err.append({'class': 9002001, 'subclass': 80069399, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'bridge:name', mapcss.tag(tags, u'bridge_name')]]), + '-': ([ + u'bridge_name']) + }}) + + # *[access=public] + if (u'access' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'public')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"access=yes" + # fixAdd:"access=yes" + err.append({'class': 9002001, 'subclass': 1115157097, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'access',u'yes']]) + }}) + + # *[crossing=island] + if (u'crossing' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'crossing') == mapcss._value_capture(capture_tags, 0, u'island')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"crossing:island=yes" + # fixRemove:"crossing" + # fixAdd:"crossing:island=yes" + err.append({'class': 9002001, 'subclass': 1512561318, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'crossing:island',u'yes']]), + '-': ([ + u'crossing']) + }}) + + return err + + def relation(self, data, tags, members): + capture_tags = {} + keys = tags.keys() + err = [] + set_diaper___checked = set_diaper_checked = set_samecolor = False + + # *[barrier=wire_fence] + if (u'barrier' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'wire_fence')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"barrier=fence + fence_type=chain_link" + # fixAdd:"barrier=fence" + # fixAdd:"fence_type=chain_link" + err.append({'class': 9002001, 'subclass': 1107799632, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'barrier',u'fence'], + [u'fence_type',u'chain_link']]) + }}) + + # *[barrier=wood_fence] + if (u'barrier' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'wood_fence')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"barrier=fence + fence_type=wood" + # fixAdd:"barrier=fence" + # fixAdd:"fence_type=wood" + err.append({'class': 9002001, 'subclass': 1412230714, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'barrier',u'fence'], + [u'fence_type',u'wood']]) + }}) + + # *[highway=stile] + if (u'highway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'stile')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"barrier=stile" + # fixAdd:"barrier=stile" + # fixRemove:"highway" + err.append({'class': 9002001, 'subclass': 1435678043, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'barrier',u'stile']]), + '-': ([ + u'highway']) + }}) + + # *[highway=incline] + if (u'highway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'incline')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"incline" + err.append({'class': 9002001, 'subclass': 765169083, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[highway=incline_steep] + if (u'highway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'incline_steep')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"incline" + err.append({'class': 9002001, 'subclass': 1966772390, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[highway=unsurfaced] + if (u'highway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'unsurfaced')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"highway=* + surface=unpaved" + # fixAdd:"highway=road" + # fixAdd:"surface=unpaved" + err.append({'class': 9002001, 'subclass': 20631498, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'highway',u'road'], + [u'surface',u'unpaved']]) + }}) + + # *[landuse=wood] + if (u'landuse' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'wood')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"landuse=forest" + # suggestAlternative:"natural=wood" + err.append({'class': 9002001, 'subclass': 469903103, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[natural=marsh] + if (u'natural' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'marsh')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"natural=wetland + wetland=marsh" + # fixAdd:"natural=wetland" + # fixAdd:"wetland=marsh" + err.append({'class': 9002001, 'subclass': 1459865523, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'natural',u'wetland'], + [u'wetland',u'marsh']]) + }}) + + # *[highway=byway] + if (u'highway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'byway')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + err.append({'class': 9002001, 'subclass': 1844620979, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[power_source] + if (u'power_source' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power_source')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"generator:source" + err.append({'class': 9002001, 'subclass': 34751027, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[power_rating] + if (u'power_rating' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power_rating')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"generator:output" + err.append({'class': 9002001, 'subclass': 904750343, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[shop=antique] + if (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'antique')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=antiques" + # fixAdd:"shop=antiques" + err.append({'class': 9002001, 'subclass': 596668979, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop',u'antiques']]) + }}) + + # *[shop=bags] + if (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'bags')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=bag" + # fixAdd:"shop=bag" + err.append({'class': 9002001, 'subclass': 1709003584, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop',u'bag']]) + }}) + + # *[shop=fashion] + if (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'fashion')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=clothes" + # fixAdd:"shop=clothes" + err.append({'class': 9002001, 'subclass': 985619804, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop',u'clothes']]) + }}) + + # *[shop=organic] + if (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'organic')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=* + organic=only" + # suggestAlternative:"shop=* + organic=yes" + err.append({'class': 9002001, 'subclass': 1959365145, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[shop=pets] + if (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'pets')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=pet" + # fixAdd:"shop=pet" + err.append({'class': 9002001, 'subclass': 290270098, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop',u'pet']]) + }}) + + # *[shop=pharmacy] + if (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'pharmacy')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"amenity=pharmacy" + # fixChangeKey:"shop => amenity" + err.append({'class': 9002001, 'subclass': 350722657, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'amenity', mapcss.tag(tags, u'shop')]]), + '-': ([ + u'shop']) + }}) + + # *[bicycle_parking=sheffield] + if (u'bicycle_parking' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bicycle_parking') == mapcss._value_capture(capture_tags, 0, u'sheffield')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"bicycle_parking=stands" + # fixAdd:"bicycle_parking=stands" + err.append({'class': 9002001, 'subclass': 718874663, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'bicycle_parking',u'stands']]) + }}) + + # *[amenity=emergency_phone] + if (u'amenity' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'emergency_phone')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"emergency=phone" + # fixRemove:"amenity" + # fixAdd:"emergency=phone" + err.append({'class': 9002001, 'subclass': 1108230656, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'emergency',u'phone']]), + '-': ([ + u'amenity']) + }}) + + # *[sport=gaelic_football] + if (u'sport' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'gaelic_football')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"sport=gaelic_games" + # fixAdd:"sport=gaelic_games" + err.append({'class': 9002001, 'subclass': 1768681881, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'sport',u'gaelic_games']]) + }}) + + # *[power=station] + if (u'power' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'station')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"power=plant" + # suggestAlternative:"power=substation" + err.append({'class': 9002001, 'subclass': 52025933, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[power=sub_station] + if (u'power' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'sub_station')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"power=substation" + # fixAdd:"power=substation" + err.append({'class': 9002001, 'subclass': 1423074682, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'power',u'substation']]) + }}) + + # *[generator:method=dam] + if (u'generator:method' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') == mapcss._value_capture(capture_tags, 0, u'dam')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"generator:method=water-storage" + # fixAdd:"generator:method=water-storage" + err.append({'class': 9002001, 'subclass': 248819368, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'generator:method',u'water-storage']]) + }}) + + # *[generator:method=pumped-storage] + if (u'generator:method' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') == mapcss._value_capture(capture_tags, 0, u'pumped-storage')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"generator:method=water-pumped-storage" + # fixAdd:"generator:method=water-pumped-storage" + err.append({'class': 9002001, 'subclass': 93454158, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'generator:method',u'water-pumped-storage']]) + }}) + + # *[generator:method=pumping] + if (u'generator:method' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'generator:method') == mapcss._value_capture(capture_tags, 0, u'pumping')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"generator:method=water-pumped-storage" + # fixAdd:"generator:method=water-pumped-storage" + err.append({'class': 9002001, 'subclass': 2115673716, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'generator:method',u'water-pumped-storage']]) + }}) + + # *[fence_type=chain] + if (u'fence_type' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fence_type') == mapcss._value_capture(capture_tags, 0, u'chain')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"barrier=chain" + # suggestAlternative:"barrier=fence + fence_type=chain_link" + err.append({'class': 9002001, 'subclass': 19409288, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[building=entrance] + if (u'building' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'entrance')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"entrance" + err.append({'class': 9002001, 'subclass': 306662985, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[board_type=board] + if (u'board_type' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'board_type') == mapcss._value_capture(capture_tags, 0, u'board')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # fixRemove:"board_type" + err.append({'class': 9002001, 'subclass': 1150949316, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'board_type']) + }}) + + # *[man_made=measurement_station] + if (u'man_made' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'measurement_station')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"man_made=monitoring_station" + # fixAdd:"man_made=monitoring_station" + err.append({'class': 9002001, 'subclass': 700465123, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'man_made',u'monitoring_station']]) + }}) + + # *[measurement=water_level] + if (u'measurement' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'measurement') == mapcss._value_capture(capture_tags, 0, u'water_level')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"monitoring:water_level=yes" + # fixRemove:"measurement" + # fixAdd:"monitoring:water_level=yes" + err.append({'class': 9002001, 'subclass': 634647702, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'monitoring:water_level',u'yes']]), + '-': ([ + u'measurement']) + }}) + + # *[measurement=weather] + if (u'measurement' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'measurement') == mapcss._value_capture(capture_tags, 0, u'weather')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"monitoring:weather=yes" + # fixRemove:"measurement" + # fixAdd:"monitoring:weather=yes" + err.append({'class': 9002001, 'subclass': 336627227, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'monitoring:weather',u'yes']]), + '-': ([ + u'measurement']) + }}) + + # *[measurement=seismic] + if (u'measurement' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'measurement') == mapcss._value_capture(capture_tags, 0, u'seismic')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"monitoring:seismic_activity=yes" + # fixRemove:"measurement" + # fixAdd:"monitoring:seismic_activity=yes" + err.append({'class': 9002001, 'subclass': 1402131289, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'monitoring:seismic_activity',u'yes']]), + '-': ([ + u'measurement']) + }}) + + # *[monitoring:river_level] + if (u'monitoring:river_level' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'monitoring:river_level')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"monitoring:water_level" + # fixChangeKey:"monitoring:river_level => monitoring:water_level" + err.append({'class': 9002001, 'subclass': 264907924, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'monitoring:water_level', mapcss.tag(tags, u'monitoring:river_level')]]), + '-': ([ + u'monitoring:river_level']) + }}) + + # *[stay] + if (u'stay' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'stay')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"maxstay" + # fixChangeKey:"stay => maxstay" + err.append({'class': 9002001, 'subclass': 787370129, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'maxstay', mapcss.tag(tags, u'stay')]]), + '-': ([ + u'stay']) + }}) + + # *[emergency=aed] + if (u'emergency' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'emergency') == mapcss._value_capture(capture_tags, 0, u'aed')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"emergency=defibrillator" + # fixAdd:"emergency=defibrillator" + err.append({'class': 9002001, 'subclass': 707111885, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'emergency',u'defibrillator']]) + }}) + + # *[day_on][!restriction] + # *[day_off][!restriction] + # *[date_on][!restriction] + # *[date_off][!restriction] + # *[hour_on][!restriction] + # *[hour_off][!restriction] + if (u'date_off' in keys) or (u'date_on' in keys) or (u'day_off' in keys) or (u'day_on' in keys) or (u'hour_off' in keys) or (u'hour_on' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'day_on') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'day_off') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'date_on') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'date_off') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'hour_on') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'hour_off') and not mapcss._tag_capture(capture_tags, 1, tags, u'restriction')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"*:conditional" + err.append({'class': 9002001, 'subclass': 294264920, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[access=designated] + if (u'access' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'designated')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("''{0}'' is meaningless, use more specific tags, e.g. ''{1}''","access=designated","bicycle=designated") + err.append({'class': 9002002, 'subclass': 2057594338, 'text': mapcss.tr(u'\'\'{0}\'\' is meaningless, use more specific tags, e.g. \'\'{1}\'\'', u'access=designated', u'bicycle=designated')}) + + # *[access=official] + if (u'access' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'official')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("''{0}'' does not specify the official mode of transportation, use ''{1}'' for example","access=official","bicycle=official") + err.append({'class': 9002003, 'subclass': 1909133836, 'text': mapcss.tr(u'\'\'{0}\'\' does not specify the official mode of transportation, use \'\'{1}\'\' for example', u'access=official', u'bicycle=official')}) + + # *[fixme=yes] + # *[FIXME=yes] + if (u'FIXME' in keys) or (u'fixme' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fixme') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'FIXME') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("{0}={1} is unspecific. Instead of ''{1}'' please give more information about what exactly should be fixed.","{0.key}","{0.value}") + err.append({'class': 9002004, 'subclass': 136657482, 'text': mapcss.tr(u'{0}={1} is unspecific. Instead of \'\'{1}\'\' please give more information about what exactly should be fixed.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) + + # *[name][name=~/^(?i)fixme$/] + if (u'name' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_1f92073a), mapcss._tag_capture(capture_tags, 1, tags, u'name'))) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("Wrong usage of {0} tag. Remove {1}, because it is clear that the name is missing even without an additional tag.","{0.key}","{0.tag}") + # fixRemove:"name" + err.append({'class': 9002005, 'subclass': 642340557, 'text': mapcss.tr(u'Wrong usage of {0} tag. Remove {1}, because it is clear that the name is missing even without an additional tag.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'name']) + }}) + + # *[note][note=~/^(?i)fixme$/] + if (u'note' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'note') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_1f92073a), mapcss._tag_capture(capture_tags, 1, tags, u'note'))) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("{0} is unspecific. Instead use the key fixme with the information what exactly should be fixed in the value of fixme.","{0.tag}") + err.append({'class': 9002006, 'subclass': 1243120287, 'text': mapcss.tr(u'{0} is unspecific. Instead use the key fixme with the information what exactly should be fixed in the value of fixme.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[type=broad_leaved] + # *[type=broad_leafed] + if (u'type' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'broad_leaved')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'broad_leafed')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leaf_type=broadleaved" + # fixAdd:"leaf_type=broadleaved" + # fixRemove:"{0.key}" + err.append({'class': 9002001, 'subclass': 293968062, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'leaf_type',u'broadleaved']]), + '-': ([ + mapcss._tag_uncapture(capture_tags, u'{0.key}')]) + }}) + + # *[wood=coniferous] + # *[type=coniferous] + # *[type=conifer] + if (u'type' in keys) or (u'wood' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'coniferous')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'coniferous')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'conifer')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leaf_type=needleleaved" + # fixAdd:"leaf_type=needleleaved" + # fixRemove:"{0.key}" + err.append({'class': 9002001, 'subclass': 50517650, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'leaf_type',u'needleleaved']]), + '-': ([ + mapcss._tag_uncapture(capture_tags, u'{0.key}')]) + }}) + + # *[wood=mixed] + if (u'wood' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'mixed')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leaf_type=mixed" + # fixAdd:"leaf_type=mixed" + # fixRemove:"wood" + err.append({'class': 9002001, 'subclass': 235914603, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'leaf_type',u'mixed']]), + '-': ([ + u'wood']) + }}) + + # *[wood=evergreen] + # *[type=evergreen] + if (u'type' in keys) or (u'wood' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'evergreen')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'evergreen')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leaf_cycle=evergreen" + # fixAdd:"leaf_cycle=evergreen" + # fixRemove:"{0.key}" + err.append({'class': 9002001, 'subclass': 747964532, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'leaf_cycle',u'evergreen']]), + '-': ([ + mapcss._tag_uncapture(capture_tags, u'{0.key}')]) + }}) + + # *[type=deciduous] + # *[type=deciduos] + if (u'type' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'deciduous')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'type') == mapcss._value_capture(capture_tags, 0, u'deciduos')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leaf_cycle=deciduous" + # fixAdd:"leaf_cycle=deciduous" + # fixRemove:"type" + err.append({'class': 9002001, 'subclass': 591116099, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'leaf_cycle',u'deciduous']]), + '-': ([ + u'type']) + }}) + + # *[wood=deciduous] + if (u'wood' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'wood') == mapcss._value_capture(capture_tags, 0, u'deciduous')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leaf_type + leaf_cycle" + err.append({'class': 9002001, 'subclass': 1100223594, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[natural=land] + if (u'natural' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'land')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated. Please use instead a multipolygon.","{0.tag}") err.append({'class': 9002001, 'subclass': 94558529, 'text': mapcss.tr(u'{0} is deprecated. Please use instead a multipolygon.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[bridge=causeway] - if (u'bridge' in keys): + # *[bridge=causeway] + if (u'bridge' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'causeway')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"bridge=low_water_crossing" + # suggestAlternative:"embankment=yes" + # suggestAlternative:"ford=yes" + err.append({'class': 9002001, 'subclass': 461671124, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[bridge=swing] + if (u'bridge' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'swing')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"bridge:movable=swing" + # suggestAlternative:"bridge:structure=simple-suspension" + err.append({'class': 9002001, 'subclass': 1047428067, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[bridge=suspension] + if (u'bridge' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'suspension')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"bridge=yes + bridge:structure=suspension" + # fixAdd:"bridge:structure=suspension" + # fixAdd:"bridge=yes" + err.append({'class': 9002001, 'subclass': 1157046268, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'bridge:structure',u'suspension'], + [u'bridge',u'yes']]) + }}) + + # *[bridge=pontoon] + if (u'bridge' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'pontoon')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"bridge=yes + bridge:structure=floating" + # fixAdd:"bridge:structure=floating" + # fixAdd:"bridge=yes" + err.append({'class': 9002001, 'subclass': 1195531951, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'bridge:structure',u'floating'], + [u'bridge',u'yes']]) + }}) + + # *[fee=interval] + # *[lit=interval] + # *[supervised=interval] + if (u'fee' in keys) or (u'lit' in keys) or (u'supervised' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fee') == mapcss._value_capture(capture_tags, 0, u'interval')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'lit') == mapcss._value_capture(capture_tags, 0, u'interval')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'supervised') == mapcss._value_capture(capture_tags, 0, u'interval')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated. Please specify interval by using opening_hours syntax","{0.tag}") + err.append({'class': 9002001, 'subclass': 417886592, 'text': mapcss.tr(u'{0} is deprecated. Please specify interval by using opening_hours syntax', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[/josm\/ignore/] + if True: + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_5ee0acf2)) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwError:tr("{0} is deprecated. Please delete this object and use a private layer instead","{0.key}") + # fixDeleteObject:this + err.append({'class': 9002001, 'subclass': 1402743016, 'text': mapcss.tr(u'{0} is deprecated. Please delete this object and use a private layer instead', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[sport=diving] + if (u'sport' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'diving')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"sport=cliff_diving" + # suggestAlternative:"sport=scuba_diving" + err.append({'class': 9002001, 'subclass': 590643159, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[parking=park_and_ride] + if (u'parking' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'parking') == mapcss._value_capture(capture_tags, 0, u'park_and_ride')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"amenity=parking + park_ride=yes" + # fixAdd:"amenity=parking" + # fixAdd:"park_ride=yes" + # fixRemove:"parking" + err.append({'class': 9002001, 'subclass': 1893516041, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'amenity',u'parking'], + [u'park_ride',u'yes']]), + '-': ([ + u'parking']) + }}) + + # *[police=yes] + # *[traffic_calming=yes] + # *[access=restricted] + # *[barrier=yes] + # *[aerialway=yes][!public_transport] + # *[amenity=yes] + # *[leisure=yes] + # *[shop="*"] + # *[shop=yes][amenity!=fuel] + # *[craft=yes] + # *[service=yes] + # *[place=yes] + if (u'access' in keys) or (u'aerialway' in keys) or (u'amenity' in keys) or (u'barrier' in keys) or (u'craft' in keys) or (u'leisure' in keys) or (u'place' in keys) or (u'police' in keys) or (u'service' in keys) or (u'shop' in keys) or (u'traffic_calming' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'police') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'traffic_calming') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'restricted')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aerialway') == mapcss._value_capture(capture_tags, 0, u'yes') and not mapcss._tag_capture(capture_tags, 1, tags, u'public_transport')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'*')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'yes') and mapcss._tag_capture(capture_tags, 1, tags, u'amenity') != mapcss._value_const_capture(capture_tags, 1, u'fuel', u'fuel')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'craft') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'service') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("{0}={1} is unspecific. Please replace ''{1}'' by a specific value.","{0.key}","{0.value}") + err.append({'class': 9002007, 'subclass': 1089883099, 'text': mapcss.tr(u'{0}={1} is unspecific. Please replace \'\'{1}\'\' by a specific value.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) + + # *[place_name][!name] + if (u'place_name' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place_name') and not mapcss._tag_capture(capture_tags, 1, tags, u'name')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("{0} should be replaced with {1}","{0.key}","{1.key}") + # fixChangeKey:"place_name => name" + err.append({'class': 9002008, 'subclass': 1089331760, 'text': mapcss.tr(u'{0} should be replaced with {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'name', mapcss.tag(tags, u'place_name')]]), + '-': ([ + u'place_name']) + }}) + + # *[place][place_name=*name] + if (u'place' in keys and u'place_name' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place') and mapcss._tag_capture(capture_tags, 1, tags, u'place_name') == mapcss._value_capture(capture_tags, 1, mapcss.tag(tags, u'name'))) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("{0} = {1}; remove {0}","{1.key}","{1.value}") + # fixRemove:"{1.key}" + err.append({'class': 9002009, 'subclass': 1116761280, 'text': mapcss.tr(u'{0} = {1}; remove {0}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{1.value}')), 'allow_fix_override': True, 'fix': { + '-': ([ + mapcss._tag_uncapture(capture_tags, u'{1.key}')]) + }}) + + # *[waterway=water_point] + if (u'waterway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'water_point')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"amenity=water_point" + # fixChangeKey:"waterway => amenity" + err.append({'class': 9002001, 'subclass': 103347605, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'amenity', mapcss.tag(tags, u'waterway')]]), + '-': ([ + u'waterway']) + }}) + + # *[waterway=waste_disposal] + if (u'waterway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'waste_disposal')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"amenity=waste_disposal" + # fixChangeKey:"waterway => amenity" + err.append({'class': 9002001, 'subclass': 1963461348, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'amenity', mapcss.tag(tags, u'waterway')]]), + '-': ([ + u'waterway']) + }}) + + # *[waterway=mooring] + if (u'waterway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'mooring')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"mooring=yes" + # fixAdd:"mooring=yes" + # fixRemove:"waterway" + err.append({'class': 9002001, 'subclass': 81358738, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'mooring',u'yes']]), + '-': ([ + u'waterway']) + }}) + + # *[building][levels] + # *[building:part=yes][levels] + if (u'building' in keys and u'levels' in keys) or (u'building:part' in keys and u'levels' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') and mapcss._tag_capture(capture_tags, 1, tags, u'levels')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building:part') == mapcss._value_capture(capture_tags, 0, u'yes') and mapcss._tag_capture(capture_tags, 1, tags, u'levels')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{1.key}") + # suggestAlternative:"building:levels" + # fixChangeKey:"levels => building:levels" + err.append({'class': 9002001, 'subclass': 293177436, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{1.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'building:levels', mapcss.tag(tags, u'levels')]]), + '-': ([ + u'levels']) + }}) + + # *[protected_class] + if (u'protected_class' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'protected_class')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"protect_class" + # fixChangeKey:"protected_class => protect_class" + err.append({'class': 9002001, 'subclass': 716999373, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'protect_class', mapcss.tag(tags, u'protected_class')]]), + '-': ([ + u'protected_class']) + }}) + + # *[lock=unknown] + # *[hide=unknown] + # *[shelter=unknown] + # *[access=unknown] + # *[capacity:parent=unknown] + # *[capacity:women=unknown] + # *[capacity:disabled=unknown] + # *[crossing=unknown] + # *[foot=unknown] + if (u'access' in keys) or (u'capacity:disabled' in keys) or (u'capacity:parent' in keys) or (u'capacity:women' in keys) or (u'crossing' in keys) or (u'foot' in keys) or (u'hide' in keys) or (u'lock' in keys) or (u'shelter' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'lock') == mapcss._value_capture(capture_tags, 0, u'unknown')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'hide') == mapcss._value_capture(capture_tags, 0, u'unknown')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shelter') == mapcss._value_capture(capture_tags, 0, u'unknown')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'unknown')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'capacity:parent') == mapcss._value_capture(capture_tags, 0, u'unknown')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'capacity:women') == mapcss._value_capture(capture_tags, 0, u'unknown')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'capacity:disabled') == mapcss._value_capture(capture_tags, 0, u'unknown')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'crossing') == mapcss._value_capture(capture_tags, 0, u'unknown')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'foot') == mapcss._value_capture(capture_tags, 0, u'unknown')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("Unspecific tag {0}","{0.tag}") + err.append({'class': 9002010, 'subclass': 1289257359, 'text': mapcss.tr(u'Unspecific tag {0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[sport=skiing] + if (u'sport' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'skiing')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("Definition of {0} is unclear","{0.tag}") + # suggestAlternative:tr("{0} + {1} + {2}","piste:type=*","piste:difficulty=*","piste:grooming=*") + err.append({'class': 9002001, 'subclass': 1578959559, 'text': mapcss.tr(u'Definition of {0} is unclear', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[waterway=wadi] + if (u'waterway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'wadi')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"natural=valley" + # suggestAlternative:"{0.key}=* + intermittent=yes" + err.append({'class': 9002001, 'subclass': 719234223, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[drinkable] + if (u'drinkable' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'drinkable')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"drinking_water" + err.append({'class': 9002001, 'subclass': 1785584789, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[color][!colour] + if (u'color' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'color') and not mapcss._tag_capture(capture_tags, 1, tags, u'colour')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"colour" + # fixChangeKey:"color => colour" + err.append({'class': 9002001, 'subclass': 1850270072, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'colour', mapcss.tag(tags, u'color')]]), + '-': ([ + u'color']) + }}) + + # *[color][colour][color=*colour] + if (u'color' in keys and u'colour' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'color') and mapcss._tag_capture(capture_tags, 1, tags, u'colour') and mapcss._tag_capture(capture_tags, 2, tags, u'color') == mapcss._value_capture(capture_tags, 2, mapcss.tag(tags, u'colour'))) + except mapcss.RuleAbort: pass + if match: + # setsamecolor + # group:tr("deprecated tagging") + # throwWarning:tr("{0} together with {1}","{0.key}","{1.key}") + # suggestAlternative:"colour" + # fixRemove:"color" + set_samecolor = True + err.append({'class': 9002001, 'subclass': 1825345743, 'text': mapcss.tr(u'{0} together with {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'color']) + }}) + + # *[color][colour]!.samecolor + if (u'color' in keys and u'colour' in keys): + match = False + if not match: + capture_tags = {} + try: match = (not set_samecolor and mapcss._tag_capture(capture_tags, 0, tags, u'color') and mapcss._tag_capture(capture_tags, 1, tags, u'colour')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} together with {1} and conflicting values","{0.key}","{1.key}") + # suggestAlternative:"colour" + err.append({'class': 9002001, 'subclass': 1064658218, 'text': mapcss.tr(u'{0} together with {1} and conflicting values', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) + + # *[building:color][building:colour]!.samebuildingcolor + # Use undeclared class samebuildingcolor + + # *[roof:color][roof:colour]!.sameroofcolor + # Use undeclared class sameroofcolor + + # *[/:color/][!building:color][!roof:color] + if True: + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_554de4c7) and not mapcss._tag_capture(capture_tags, 1, tags, u'building:color') and not mapcss._tag_capture(capture_tags, 2, tags, u'roof:color')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:":colour" + err.append({'class': 9002001, 'subclass': 238251143, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[/color:/] + if True: + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_0c5b5730)) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"colour:" + err.append({'class': 9002001, 'subclass': 1390370717, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[/=|\+|\/|&|<|>|;|'|"|%|#|@|\\|,|\.|\{|\}|\?|\*|\^|\$/] + if True: + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_620f4d52)) + except mapcss.RuleAbort: pass + if match: + # group:tr("key with uncommon character") + # throwWarning:tr("{0}","{0.key}") + err.append({'class': 9002011, 'subclass': 1752615188, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[/^.$/] + # relation[/^..$/][!to] + if True: + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_27210286)) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_34c15d62) and not mapcss._tag_capture(capture_tags, 1, tags, u'to')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("uncommon short key") + # assertMatch:"relation fo=bar" + # assertNoMatch:"relation to=Berlin" + err.append({'class': 9002012, 'subclass': 518970721, 'text': mapcss.tr(u'uncommon short key')}) + + # *[sport=hockey] + if (u'sport' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'hockey')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"sport=field_hockey" + # suggestAlternative:"sport=ice_hockey" + err.append({'class': 9002001, 'subclass': 651933474, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[sport=billard] + # *[sport=billards] + # *[sport=billiard] + if (u'sport' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'billard')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'billards')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'billiard')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"sport=billiards" + # fixAdd:"sport=billiards" + err.append({'class': 9002001, 'subclass': 1522897824, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'sport',u'billiards']]) + }}) + + # *[payment:credit_cards=yes] + if (u'payment:credit_cards' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:credit_cards') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:mastercard=yes","payment:visa=yes") + err.append({'class': 9002013, 'subclass': 705181097, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:mastercard=yes', u'payment:visa=yes')}) + + # *[payment:debit_cards=yes] + if (u'payment:debit_cards' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:debit_cards') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:maestro=yes","payment:girocard=yes") + err.append({'class': 9002013, 'subclass': 679215558, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:maestro=yes', u'payment:girocard=yes')}) + + # *[payment:electronic_purses=yes] + if (u'payment:electronic_purses' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:electronic_purses') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:ep_geldkarte=yes","payment:ep_quick=yes") + err.append({'class': 9002013, 'subclass': 1440457244, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:ep_geldkarte=yes', u'payment:ep_quick=yes')}) + + # *[payment:cryptocurrencies=yes] + if (u'payment:cryptocurrencies' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:cryptocurrencies') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:bitcoin=yes","payment:litecoin=yes") + err.append({'class': 9002013, 'subclass': 1325255949, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:bitcoin=yes', u'payment:litecoin=yes')}) + + # *[payment:ep_quick] + # *[payment:ep_cash] + # *[payment:ep_proton] + # *[payment:ep_chipknip] + if (u'payment:ep_cash' in keys) or (u'payment:ep_chipknip' in keys) or (u'payment:ep_proton' in keys) or (u'payment:ep_quick' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_quick')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_cash')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_proton')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_chipknip')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # fixRemove:"{0.key}" + err.append({'class': 9002001, 'subclass': 332575437, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '-': ([ + mapcss._tag_uncapture(capture_tags, u'{0.key}')]) + }}) + + # *[kp][highway=milestone] + # *[kp][railway=milestone] + # *[kp][waterway=milestone] + if (u'highway' in keys and u'kp' in keys) or (u'kp' in keys and u'railway' in keys) or (u'kp' in keys and u'waterway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kp') and mapcss._tag_capture(capture_tags, 1, tags, u'highway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kp') and mapcss._tag_capture(capture_tags, 1, tags, u'railway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kp') and mapcss._tag_capture(capture_tags, 1, tags, u'waterway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"distance" + # fixChangeKey:"kp => distance" + err.append({'class': 9002001, 'subclass': 1078799228, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'distance', mapcss.tag(tags, u'kp')]]), + '-': ([ + u'kp']) + }}) + + # *[pk][highway=milestone] + # *[pk][railway=milestone] + # *[pk][waterway=milestone] + if (u'highway' in keys and u'pk' in keys) or (u'pk' in keys and u'railway' in keys) or (u'pk' in keys and u'waterway' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'causeway')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'pk') and mapcss._tag_capture(capture_tags, 1, tags, u'highway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'pk') and mapcss._tag_capture(capture_tags, 1, tags, u'railway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'pk') and mapcss._tag_capture(capture_tags, 1, tags, u'waterway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"distance" + # fixChangeKey:"pk => distance" + err.append({'class': 9002001, 'subclass': 719029418, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'distance', mapcss.tag(tags, u'pk')]]), + '-': ([ + u'pk']) + }}) + + # *[postcode] + if (u'postcode' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'postcode')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"addr:postcode" + # suggestAlternative:"postal_code" + err.append({'class': 9002001, 'subclass': 1942523538, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + + # *[water=intermittent] + if (u'water' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'intermittent')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"bridge=low_water_crossing" - # suggestAlternative:"embankment=yes" - # suggestAlternative:"ford=yes" - err.append({'class': 9002001, 'subclass': 461671124, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"intermittent=yes" + # fixAdd:"intermittent=yes" + # fixRemove:"water" + err.append({'class': 9002001, 'subclass': 813530321, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'intermittent',u'yes']]), + '-': ([ + u'water']) + }}) + + # *[landuse=farm] + if (u'landuse' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'farm')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"landuse=farmland" + # suggestAlternative:"landuse=farmyard" + err.append({'class': 9002001, 'subclass': 1968473048, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[seamark=buoy]["seamark:type"=~/^(buoy_cardinal|buoy_installation|buoy_isolated_danger|buoy_lateral|buoy_safe_water|buoy_special_purpose|mooring)$/] + if (u'seamark' in keys and u'seamark:type' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'seamark') == mapcss._value_capture(capture_tags, 0, u'buoy') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_61b0be1b), mapcss._tag_capture(capture_tags, 1, tags, u'seamark:type'))) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"{1.tag}" + # fixRemove:"seamark" + err.append({'class': 9002001, 'subclass': 1224401740, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'seamark']) + }}) + + # *[seamark=buoy]["seamark:type"!~/^(buoy_cardinal|buoy_installation|buoy_isolated_danger|buoy_lateral|buoy_safe_water|buoy_special_purpose|mooring)$/] + if (u'seamark' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'seamark') == mapcss._value_capture(capture_tags, 0, u'buoy') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_61b0be1b, u'^(buoy_cardinal|buoy_installation|buoy_isolated_danger|buoy_lateral|buoy_safe_water|buoy_special_purpose|mooring)$'), mapcss._tag_capture(capture_tags, 1, tags, u'seamark:type'))) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"{1.tag}" + err.append({'class': 9002001, 'subclass': 1481035998, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[landuse=conservation] + if (u'landuse' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'conservation')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"boundary=protected_area" + # fixAdd:"boundary=protected_area" + # fixRemove:"landuse" + err.append({'class': 9002001, 'subclass': 824801072, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'boundary',u'protected_area']]), + '-': ([ + u'landuse']) + }}) + + # *[amenity=kiosk] + if (u'amenity' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'kiosk')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=kiosk" + # fixChangeKey:"amenity => shop" + err.append({'class': 9002001, 'subclass': 1331930630, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop', mapcss.tag(tags, u'amenity')]]), + '-': ([ + u'amenity']) + }}) + + # *[amenity=shop] + if (u'amenity' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'shop')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=*" + err.append({'class': 9002001, 'subclass': 1562207150, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[shop=fishmonger] + if (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'fishmonger')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=seafood" + # fixAdd:"shop=seafood" + err.append({'class': 9002001, 'subclass': 1376789416, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop',u'seafood']]) + }}) + + # *[shop=fish] + if (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'fish')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=fishing" + # suggestAlternative:"shop=pet" + # suggestAlternative:"shop=seafood" + err.append({'class': 9002001, 'subclass': 47191734, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[shop=betting] + if (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'betting')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"amenity=casino" + # suggestAlternative:"amenity=gambling" + # suggestAlternative:"leisure=adult_gaming_centre" + # suggestAlternative:"leisure=amusement_arcade" + # suggestAlternative:"shop=bookmaker" + # suggestAlternative:"shop=lottery" + err.append({'class': 9002001, 'subclass': 1035501389, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[shop=perfume] + if (u'shop' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'perfume')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=perfumery" + # fixAdd:"shop=perfumery" + err.append({'class': 9002001, 'subclass': 2075099676, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop',u'perfumery']]) + }}) + + # *[amenity=exercise_point] + if (u'amenity' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'exercise_point')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leisure=fitness_station" + # fixRemove:"amenity" + # fixAdd:"leisure=fitness_station" + err.append({'class': 9002001, 'subclass': 1514920202, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'leisure',u'fitness_station']]), + '-': ([ + u'amenity']) + }}) - # *[bridge=swing] - if (u'bridge' in keys): + # *[shop=auto_parts] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'swing')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'auto_parts')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"bridge:movable=swing" - # suggestAlternative:"bridge:structure=simple-suspension" - err.append({'class': 9002001, 'subclass': 1047428067, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"shop=car_parts" + # fixAdd:"shop=car_parts" + err.append({'class': 9002001, 'subclass': 1675828779, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop',u'car_parts']]) + }}) - # *[bridge=suspension] - if (u'bridge' in keys): + # *[amenity=car_repair] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge') == mapcss._value_capture(capture_tags, 0, u'suspension')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'car_repair')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"bridge=yes + bridge:structure=suspension" - # fixAdd:"bridge:structure=suspension" - # fixAdd:"bridge=yes" - err.append({'class': 9002001, 'subclass': 1157046268, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"shop=car_repair" + # fixChangeKey:"amenity => shop" + err.append({'class': 9002001, 'subclass': 1681273585, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'bridge:structure',u'suspension'], - [u'bridge',u'yes']]) + [u'shop', mapcss.tag(tags, u'amenity')]]), + '-': ([ + u'amenity']) }}) - # *[fee=interval] - # *[lit=interval] - # *[supervised=interval] - if (u'fee' in keys) or (u'lit' in keys) or (u'supervised' in keys): + # *[amenity=studio][type=audio] + # *[amenity=studio][type=radio] + # *[amenity=studio][type=television] + # *[amenity=studio][type=video] + if (u'amenity' in keys and u'type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fee') == mapcss._value_capture(capture_tags, 0, u'interval')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'audio')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'lit') == mapcss._value_capture(capture_tags, 0, u'interval')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'radio')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'supervised') == mapcss._value_capture(capture_tags, 0, u'interval')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'television')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated. Please specify interval by using opening_hours syntax","{0.tag}") - err.append({'class': 9002001, 'subclass': 417886592, 'text': mapcss.tr(u'{0} is deprecated. Please specify interval by using opening_hours syntax', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[/josm\/ignore/] - if True: - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_5ee0acf2)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'video')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwError:tr("{0} is deprecated. Please delete this object and use a private layer instead","{0.key}") - # fixDeleteObject:this - err.append({'class': 9002001, 'subclass': 1402743016, 'text': mapcss.tr(u'{0} is deprecated. Please delete this object and use a private layer instead', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # throwWarning:tr("{0} is deprecated for {1}","{1.key}","{0.tag}") + # suggestAlternative:"studio" + # fixChangeKey:"type => studio" + err.append({'class': 9002001, 'subclass': 413401822, 'text': mapcss.tr(u'{0} is deprecated for {1}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'studio', mapcss.tag(tags, u'type')]]), + '-': ([ + u'type']) + }}) - # *[sport=diving] - if (u'sport' in keys): + # *[power=cable_distribution_cabinet] + if (u'power' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'diving')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'cable_distribution_cabinet')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"sport=cliff_diving" - # suggestAlternative:"sport=scuba_diving" - err.append({'class': 9002001, 'subclass': 590643159, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"man_made=street_cabinet + street_cabinet=*" + # fixAdd:"man_made=street_cabinet" + # fixRemove:"power" + err.append({'class': 9002001, 'subclass': 1007567078, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'man_made',u'street_cabinet']]), + '-': ([ + u'power']) + }}) - # *[parking=park_and_ride] - if (u'parking' in keys): + # *[power][location=kiosk] + if (u'location' in keys and u'power' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'parking') == mapcss._value_capture(capture_tags, 0, u'park_and_ride')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') and mapcss._tag_capture(capture_tags, 1, tags, u'location') == mapcss._value_capture(capture_tags, 1, u'kiosk')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=parking + park_ride=yes" - # fixAdd:"amenity=parking" - # fixAdd:"park_ride=yes" - # fixRemove:"parking" - err.append({'class': 9002001, 'subclass': 1893516041, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{1.tag}") + # fixRemove:"location" + # fixAdd:"man_made=street_cabinet" + # fixAdd:"street_cabinet=power" + err.append({'class': 9002001, 'subclass': 182905067, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{1.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'amenity',u'parking'], - [u'park_ride',u'yes']]), + [u'man_made',u'street_cabinet'], + [u'street_cabinet',u'power']]), '-': ([ - u'parking']) + u'location']) }}) - # *[traffic_calming=yes] - # *[access=restricted] - # *[barrier=yes] - # *[aerialway=yes][!public_transport] - # *[amenity=yes] - # *[leisure=yes] - # *[shop="*"] - # *[shop=yes][amenity!=fuel] - # *[craft=yes] - # *[service=yes] - # *[place=yes] - if (u'access' in keys) or (u'aerialway' in keys) or (u'amenity' in keys) or (u'barrier' in keys) or (u'craft' in keys) or (u'leisure' in keys) or (u'place' in keys) or (u'service' in keys) or (u'shop' in keys) or (u'traffic_calming' in keys): + # *[man_made=well] + if (u'man_made' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'traffic_calming') == mapcss._value_capture(capture_tags, 0, u'yes')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'restricted')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'barrier') == mapcss._value_capture(capture_tags, 0, u'yes')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aerialway') == mapcss._value_capture(capture_tags, 0, u'yes') and not mapcss._tag_capture(capture_tags, 1, tags, u'public_transport')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'well')) except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"man_made=petroleum_well" + # suggestAlternative:"man_made=water_well" + err.append({'class': 9002001, 'subclass': 1740864107, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[amenity=dog_bin] + # *[amenity=dog_waste_bin] + if (u'amenity' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'dog_bin')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'*')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'dog_waste_bin')) except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"amenity=waste_basket + waste=dog_excrement + vending=excrement_bags" + # fixAdd:"amenity=waste_basket" + # fixAdd:"vending=excrement_bags" + # fixAdd:"waste=dog_excrement" + err.append({'class': 9002001, 'subclass': 2091877281, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'amenity',u'waste_basket'], + [u'vending',u'excrement_bags'], + [u'waste',u'dog_excrement']]) + }}) + + # *[amenity=artwork] + if (u'amenity' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'yes') and mapcss._tag_capture(capture_tags, 1, tags, u'amenity') != mapcss._value_const_capture(capture_tags, 1, u'fuel', u'fuel')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'artwork')) except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"tourism=artwork" + # fixRemove:"amenity" + # fixAdd:"tourism=artwork" + err.append({'class': 9002001, 'subclass': 728429076, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'tourism',u'artwork']]), + '-': ([ + u'amenity']) + }}) + + # *[amenity=community_center] + if (u'amenity' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'craft') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'community_center')) except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"amenity=community_centre" + # fixAdd:"amenity=community_centre" + err.append({'class': 9002001, 'subclass': 690512681, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'amenity',u'community_centre']]) + }}) + + # *[man_made=cut_line] + if (u'man_made' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'service') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'cut_line')) except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"man_made=cutline" + # fixAdd:"man_made=cutline" + err.append({'class': 9002001, 'subclass': 1008752382, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'man_made',u'cutline']]) + }}) + + # *[amenity=park] + if (u'amenity' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'park')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0}={1} is unspecific. Please replace ''{1}'' by a specific value.","{0.key}","{0.value}") - err.append({'class': 9002007, 'subclass': 962298405, 'text': mapcss.tr(u'{0}={1} is unspecific. Please replace \'\'{1}\'\' by a specific value.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leisure=park" + # fixRemove:"amenity" + # fixAdd:"leisure=park" + err.append({'class': 9002001, 'subclass': 2085280194, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'leisure',u'park']]), + '-': ([ + u'amenity']) + }}) - # *[place_name][!name] - if (u'place_name' in keys): + # *[amenity=hotel] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place_name') and not mapcss._tag_capture(capture_tags, 1, tags, u'name')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'hotel')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0} should be replaced with {1}","{0.key}","{1.key}") - # fixChangeKey:"place_name => name" - err.append({'class': 9002008, 'subclass': 1089331760, 'text': mapcss.tr(u'{0} should be replaced with {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}')), 'allow_fix_override': True, 'fix': { + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"tourism=hotel" + # fixRemove:"amenity" + # fixAdd:"tourism=hotel" + err.append({'class': 9002001, 'subclass': 1341786818, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'name', mapcss.tag(tags, u'place_name')]]), + [u'tourism',u'hotel']]), '-': ([ - u'place_name']) + u'amenity']) }}) - # *[place][place_name=*name] - if (u'place' in keys and u'place_name' in keys): + # *[shop=window] + # *[shop=windows] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place') and mapcss._tag_capture(capture_tags, 1, tags, u'place_name') == mapcss._value_capture(capture_tags, 1, mapcss.tag(tags, u'name'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'window')) except mapcss.RuleAbort: pass - if match: - # throwWarning:tr("{0} = {1}; remove {0}","{1.key}","{1.value}") - # fixRemove:"{1.key}" - err.append({'class': 9002009, 'subclass': 1116761280, 'text': mapcss.tr(u'{0} = {1}; remove {0}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{1.value}')), 'allow_fix_override': True, 'fix': { - '-': ([ - mapcss._tag_uncapture(capture_tags, u'{1.key}')]) - }}) - - # *[waterway=water_point] - if (u'waterway' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'water_point')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'windows')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=water_point" - # fixChangeKey:"waterway => amenity" - err.append({'class': 9002001, 'subclass': 103347605, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"craft=window_construction" + # fixAdd:"craft=window_construction" + # fixRemove:"shop" + err.append({'class': 9002001, 'subclass': 532391183, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'amenity', mapcss.tag(tags, u'waterway')]]), + [u'craft',u'window_construction']]), '-': ([ - u'waterway']) + u'shop']) }}) - # *[waterway=waste_disposal] - if (u'waterway' in keys): + # *[amenity=education] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'waste_disposal')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'education')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=waste_disposal" - # fixChangeKey:"waterway => amenity" - err.append({'class': 9002001, 'subclass': 1963461348, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'amenity', mapcss.tag(tags, u'waterway')]]), - '-': ([ - u'waterway']) - }}) + # suggestAlternative:"amenity=college" + # suggestAlternative:"amenity=school" + # suggestAlternative:"amenity=university" + err.append({'class': 9002001, 'subclass': 796960259, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[waterway=mooring] - if (u'waterway' in keys): + # *[shop=gallery] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'mooring')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'gallery')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"mooring=yes" - # fixAdd:"mooring=yes" - # fixRemove:"waterway" - err.append({'class': 9002001, 'subclass': 81358738, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"shop=art" + # fixAdd:"shop=art" + err.append({'class': 9002001, 'subclass': 1319611546, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'mooring',u'yes']]), - '-': ([ - u'waterway']) + [u'shop',u'art']]) }}) - # *[building][levels] - # *[building:part=yes][levels] - if (u'building' in keys and u'levels' in keys) or (u'building:part' in keys and u'levels' in keys): + # *[shop=gambling] + # *[leisure=gambling] + if (u'leisure' in keys) or (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') and mapcss._tag_capture(capture_tags, 1, tags, u'levels')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'gambling')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building:part') == mapcss._value_capture(capture_tags, 0, u'yes') and mapcss._tag_capture(capture_tags, 1, tags, u'levels')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'gambling')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{1.key}") - # suggestAlternative:"building:levels" - # fixChangeKey:"levels => building:levels" - err.append({'class': 9002001, 'subclass': 293177436, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{1.key}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'building:levels', mapcss.tag(tags, u'levels')]]), - '-': ([ - u'levels']) - }}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"amenity=casino" + # suggestAlternative:"amenity=gambling" + # suggestAlternative:"leisure=amusement_arcade" + # suggestAlternative:"shop=bookmaker" + # suggestAlternative:"shop=lottery" + err.append({'class': 9002001, 'subclass': 1955724853, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[protected_class] - if (u'protected_class' in keys): + # *[office=real_estate] + # *[office=real_estate_agent] + if (u'office' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'protected_class')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'office') == mapcss._value_capture(capture_tags, 0, u'real_estate')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'office') == mapcss._value_capture(capture_tags, 0, u'real_estate_agent')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"protect_class" - # fixChangeKey:"protected_class => protect_class" - err.append({'class': 9002001, 'subclass': 716999373, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"office=estate_agent" + # fixAdd:"office=estate_agent" + err.append({'class': 9002001, 'subclass': 2027311706, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'protect_class', mapcss.tag(tags, u'protected_class')]]), - '-': ([ - u'protected_class']) + [u'office',u'estate_agent']]) }}) - # *[lock=unknown] - # *[hide=unknown] - # *[shelter=unknown] - # *[access=unknown] - # *[capacity:parent=unknown] - # *[capacity:women=unknown] - # *[capacity:disabled=unknown] - # *[crossing=unknown] - # *[foot=unknown] - if (u'access' in keys) or (u'capacity:disabled' in keys) or (u'capacity:parent' in keys) or (u'capacity:women' in keys) or (u'crossing' in keys) or (u'foot' in keys) or (u'hide' in keys) or (u'lock' in keys) or (u'shelter' in keys): + # *[shop=glass] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'lock') == mapcss._value_capture(capture_tags, 0, u'unknown')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'hide') == mapcss._value_capture(capture_tags, 0, u'unknown')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shelter') == mapcss._value_capture(capture_tags, 0, u'unknown')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'glass')) except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"craft=glaziery" + # suggestAlternative:"shop=glaziery" + err.append({'class': 9002001, 'subclass': 712020531, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[amenity=proposed] + # *[amenity=proposed] + # *[amenity=disused] + # *[shop=disused] + # *[highway=abandoned] + # *[historic=abandoned] + if (u'amenity' in keys) or (u'highway' in keys) or (u'historic' in keys) or (u'shop' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'unknown')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'proposed')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'capacity:parent') == mapcss._value_capture(capture_tags, 0, u'unknown')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'proposed')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'capacity:women') == mapcss._value_capture(capture_tags, 0, u'unknown')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'disused')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'capacity:disabled') == mapcss._value_capture(capture_tags, 0, u'unknown')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'disused')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'crossing') == mapcss._value_capture(capture_tags, 0, u'unknown')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'highway') == mapcss._value_capture(capture_tags, 0, u'abandoned')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'foot') == mapcss._value_capture(capture_tags, 0, u'unknown')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'historic') == mapcss._value_capture(capture_tags, 0, u'abandoned')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("Unspecific tag {0}","{0.tag}") - err.append({'class': 9002010, 'subclass': 1289257359, 'text': mapcss.tr(u'Unspecific tag {0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated. Use the {1}: key prefix instead.","{0.tag}","{0.value}") + err.append({'class': 9002001, 'subclass': 1169228401, 'text': mapcss.tr(u'{0} is deprecated. Use the {1}: key prefix instead.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) - # *[sport=skiing] - if (u'sport' in keys): + # *[amenity=swimming_pool] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'skiing')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'swimming_pool')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("Definition of {0} is unclear","{0.tag}") - # suggestAlternative:tr("{0} + {1} + {2}","piste:type=*","piste:difficulty=*","piste:grooming=*") - err.append({'class': 9002001, 'subclass': 1578959559, 'text': mapcss.tr(u'Definition of {0} is unclear', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"leisure=swimming_pool" + # fixChangeKey:"amenity => leisure" + err.append({'class': 9002001, 'subclass': 2012807801, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'leisure', mapcss.tag(tags, u'amenity')]]), + '-': ([ + u'amenity']) + }}) - # *[waterway=wadi] - if (u'waterway' in keys): + # *[amenity=sauna] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'waterway') == mapcss._value_capture(capture_tags, 0, u'wadi')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'sauna')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"natural=valley" - # suggestAlternative:"{0.key}=* + intermittent=yes" - err.append({'class': 9002001, 'subclass': 719234223, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"leisure=sauna" + # fixChangeKey:"amenity => leisure" + err.append({'class': 9002001, 'subclass': 1450116742, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'leisure', mapcss.tag(tags, u'amenity')]]), + '-': ([ + u'amenity']) + }}) - # *[drinkable] - if (u'drinkable' in keys): + # *[/^[^t][^i][^g].+_[0-9]$/][!/^note_[0-9]$/][!/^description_[0-9]$/] + if True: match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'drinkable')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_300dfa36) and not mapcss._tag_capture(capture_tags, 1, tags, self.re_3185ac6d) and not mapcss._tag_capture(capture_tags, 2, tags, self.re_6d27b157)) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"drinking_water" - err.append({'class': 9002001, 'subclass': 1785584789, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # group:tr("questionable key (ending with a number)") + # throwWarning:tr("{0}","{0.key}") + err.append({'class': 9002014, 'subclass': 2081989305, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[color][!colour] - if (u'color' in keys): + # *[sport=skating] + if (u'sport' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'color') and not mapcss._tag_capture(capture_tags, 1, tags, u'colour')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'skating')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"colour" - # fixChangeKey:"color => colour" - err.append({'class': 9002001, 'subclass': 1850270072, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'colour', mapcss.tag(tags, u'color')]]), - '-': ([ - u'color']) - }}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"sport=ice_skating" + # suggestAlternative:"sport=roller_skating" + err.append({'class': 9002001, 'subclass': 170699177, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[color][colour][color=*colour] - if (u'color' in keys and u'colour' in keys): + # *[amenity=public_building] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'color') and mapcss._tag_capture(capture_tags, 1, tags, u'colour') and mapcss._tag_capture(capture_tags, 2, tags, u'color') == mapcss._value_capture(capture_tags, 2, mapcss.tag(tags, u'colour'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'public_building')) except mapcss.RuleAbort: pass if match: - # setsamecolor # group:tr("deprecated tagging") - # throwWarning:tr("{0} together with {1}","{0.key}","{1.key}") - # suggestAlternative:"colour" - # fixRemove:"color" - set_samecolor = True - err.append({'class': 9002001, 'subclass': 1825345743, 'text': mapcss.tr(u'{0} together with {1}', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}')), 'allow_fix_override': True, 'fix': { - '-': ([ - u'color']) - }}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"..." + # suggestAlternative:"amenity=community_centre" + # suggestAlternative:"amenity=hospital" + # suggestAlternative:"amenity=townhall" + # suggestAlternative:"building=hospital" + # suggestAlternative:"building=public" + # suggestAlternative:"leisure=sports_centre" + # suggestAlternative:"office=government" + err.append({'class': 9002001, 'subclass': 1295642010, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[color][colour]!.samecolor - if (u'color' in keys and u'colour' in keys): + # *[vending=news_papers] + if (u'vending' in keys): match = False if not match: capture_tags = {} - try: match = (not set_samecolor and mapcss._tag_capture(capture_tags, 0, tags, u'color') and mapcss._tag_capture(capture_tags, 1, tags, u'colour')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'vending') == mapcss._value_capture(capture_tags, 0, u'news_papers')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} together with {1} and conflicting values","{0.key}","{1.key}") - # suggestAlternative:"colour" - err.append({'class': 9002001, 'subclass': 1064658218, 'text': mapcss.tr(u'{0} together with {1} and conflicting values', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.key}'))}) - - # *[building:color][building:colour]!.samebuildingcolor - # Use undeclared class samebuildingcolor - - # *[roof:color][roof:colour]!.sameroofcolor - # Use undeclared class sameroofcolor + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"vending=newspapers" + # fixAdd:"vending=newspapers" + err.append({'class': 9002001, 'subclass': 1133820292, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'vending',u'newspapers']]) + }}) - # *[/:color/][!building:color][!roof:color] - if True: + # *[service=drive_through] + if (u'service' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_554de4c7) and not mapcss._tag_capture(capture_tags, 1, tags, u'building:color') and not mapcss._tag_capture(capture_tags, 2, tags, u'roof:color')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'service') == mapcss._value_capture(capture_tags, 0, u'drive_through')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:":colour" - err.append({'class': 9002001, 'subclass': 238251143, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"service=drive-through" + # fixAdd:"service=drive-through" + err.append({'class': 9002001, 'subclass': 283545650, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'service',u'drive-through']]) + }}) - # *[/color:/] - if True: + # *[name:botanical] + if (u'name:botanical' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_0c5b5730)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name:botanical')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"colour:" - err.append({'class': 9002001, 'subclass': 1390370717, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # suggestAlternative:"species" + err.append({'class': 9002001, 'subclass': 1061429000, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[/=|\+|\/|&|<|>|;|'|"|%|#|@|\\|,|\.|\{|\}|\?|\*|\^|\$/] - if True: + # *[shop=souvenir] + # *[shop=souvenirs] + # *[shop=souveniers] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_620f4d52)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'souvenir')) except mapcss.RuleAbort: pass - if match: - # group:tr("key with uncommon character") - # throwWarning:tr("{0}","{0.key}") - err.append({'class': 9002011, 'subclass': 1752615188, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - - # *[/^.$/] - # relation[/^..$/][!to] - if True: - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_27210286)) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'souvenirs')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_34c15d62) and not mapcss._tag_capture(capture_tags, 1, tags, u'to')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'souveniers')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("uncommon short key") - # assertMatch:"relation fo=bar" - # assertNoMatch:"relation to=Berlin" - err.append({'class': 9002012, 'subclass': 518970721, 'text': mapcss.tr(u'uncommon short key')}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=gift" + # fixAdd:"shop=gift" + err.append({'class': 9002001, 'subclass': 1794702946, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop',u'gift']]) + }}) - # *[sport=hockey] - if (u'sport' in keys): + # *[vending=animal_food] + if (u'vending' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'hockey')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'vending') == mapcss._value_capture(capture_tags, 0, u'animal_food')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"sport=field_hockey" - # suggestAlternative:"sport=ice_hockey" - err.append({'class': 9002001, 'subclass': 651933474, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"vending=animal_feed" + # fixAdd:"vending=animal_feed" + err.append({'class': 9002001, 'subclass': 1077411296, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'vending',u'animal_feed']]) + }}) - # *[sport=billard] - # *[sport=billards] - # *[sport=billiard] - if (u'sport' in keys): + # *[amenity=hunting_stand][lock=yes] + # *[amenity=hunting_stand][lock=no] + if (u'amenity' in keys and u'lock' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'billard')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'billards')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'hunting_stand') and mapcss._tag_capture(capture_tags, 1, tags, u'lock') == mapcss._value_capture(capture_tags, 1, u'yes')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'billiard')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'hunting_stand') and mapcss._tag_capture(capture_tags, 1, tags, u'lock') == mapcss._value_capture(capture_tags, 1, u'no')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"sport=billiards" - # fixAdd:"sport=billiards" - err.append({'class': 9002001, 'subclass': 1522897824, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated for {1}","{1.key}","{0.tag}") + # suggestAlternative:"lockable" + # fixChangeKey:"lock => lockable" + err.append({'class': 9002001, 'subclass': 1939599742, 'text': mapcss.tr(u'{0} is deprecated for {1}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'sport',u'billiards']]) + [u'lockable', mapcss.tag(tags, u'lock')]]), + '-': ([ + u'lock']) }}) - # *[payment:credit_cards=yes] - if (u'payment:credit_cards' in keys): + # *[amenity=advertising][!advertising] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:credit_cards') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'advertising') and not mapcss._tag_capture(capture_tags, 1, tags, u'advertising')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:mastercard=yes","payment:visa=yes") - err.append({'class': 9002013, 'subclass': 705181097, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:mastercard=yes', u'payment:visa=yes')}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"advertising=*" + err.append({'class': 9002001, 'subclass': 1696784412, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[payment:debit_cards=yes] - if (u'payment:debit_cards' in keys): + # *[amenity=advertising][advertising] + if (u'advertising' in keys and u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:debit_cards') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'advertising') and mapcss._tag_capture(capture_tags, 1, tags, u'advertising')) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:maestro=yes","payment:girocard=yes") - err.append({'class': 9002013, 'subclass': 679215558, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:maestro=yes', u'payment:girocard=yes')}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"advertising=*" + # fixRemove:"amenity" + err.append({'class': 9002001, 'subclass': 1538706366, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'amenity']) + }}) - # *[payment:electronic_purses=yes] - if (u'payment:electronic_purses' in keys): + # *[building=true] + # *[building="*"] + # *[building=Y] + # *[building=y] + # *[building=1] + if (u'building' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:electronic_purses') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'true')) except mapcss.RuleAbort: pass - if match: - # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:ep_geldkarte=yes","payment:ep_quick=yes") - err.append({'class': 9002013, 'subclass': 1440457244, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:ep_geldkarte=yes', u'payment:ep_quick=yes')}) - - # *[payment:cryptocurrencies=yes] - if (u'payment:cryptocurrencies' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:cryptocurrencies') == mapcss._value_capture(capture_tags, 0, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'*')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'Y')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'y')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, 1)) except mapcss.RuleAbort: pass if match: - # throwWarning:tr("{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.","{0.tag}","payment:bitcoin=yes","payment:litecoin=yes") - err.append({'class': 9002013, 'subclass': 1325255949, 'text': mapcss.tr(u'{0} is inaccurate. Use separate tags for each specific type, e.g. {1} or {2}.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), u'payment:bitcoin=yes', u'payment:litecoin=yes')}) + # group:tr("misspelled value") + # throwError:tr("{0}","{0.tag}") + # suggestAlternative:"building=yes" + # fixAdd:"building=yes" + err.append({'class': 9002018, 'subclass': 596818855, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'building',u'yes']]) + }}) - # *[payment:ep_quick] - # *[payment:ep_cash] - # *[payment:ep_proton] - # *[payment:ep_chipknip] - if (u'payment:ep_cash' in keys) or (u'payment:ep_chipknip' in keys) or (u'payment:ep_proton' in keys) or (u'payment:ep_quick' in keys): + # *[building=abandoned] + # *[building=address] + # *[building=bing] + # *[building=collapsed] + # *[building=damaged] + # *[building=demolished] + # *[building=disused] + # *[building=fixme] + # *[building=occupied] + # *[building=other] + # *[building=razed] + # *[building=unclassified] + # *[building=undefined] + # *[building=unknown] + # *[building=unidentified] + if (u'building' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_quick')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'abandoned')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_cash')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'address')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_proton')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'bing')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'payment:ep_chipknip')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'collapsed')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # fixRemove:"{0.key}" - err.append({'class': 9002001, 'subclass': 332575437, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { - '-': ([ - mapcss._tag_uncapture(capture_tags, u'{0.key}')]) - }}) - - # *[kp][highway=milestone] - # *[kp][railway=milestone] - # *[kp][waterway=milestone] - if (u'highway' in keys and u'kp' in keys) or (u'kp' in keys and u'railway' in keys) or (u'kp' in keys and u'waterway' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kp') and mapcss._tag_capture(capture_tags, 1, tags, u'highway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'damaged')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kp') and mapcss._tag_capture(capture_tags, 1, tags, u'railway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'demolished')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kp') and mapcss._tag_capture(capture_tags, 1, tags, u'waterway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'disused')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"distance" - # fixChangeKey:"kp => distance" - err.append({'class': 9002001, 'subclass': 1078799228, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'distance', mapcss.tag(tags, u'kp')]]), - '-': ([ - u'kp']) - }}) - - # *[pk][highway=milestone] - # *[pk][railway=milestone] - # *[pk][waterway=milestone] - if (u'highway' in keys and u'pk' in keys) or (u'pk' in keys and u'railway' in keys) or (u'pk' in keys and u'waterway' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'pk') and mapcss._tag_capture(capture_tags, 1, tags, u'highway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'fixme')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'pk') and mapcss._tag_capture(capture_tags, 1, tags, u'railway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'occupied')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'pk') and mapcss._tag_capture(capture_tags, 1, tags, u'waterway') == mapcss._value_capture(capture_tags, 1, u'milestone')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'other')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"distance" - # fixChangeKey:"pk => distance" - err.append({'class': 9002001, 'subclass': 719029418, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'distance', mapcss.tag(tags, u'pk')]]), - '-': ([ - u'pk']) - }}) - - # *[postcode] - if (u'postcode' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'postcode')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'razed')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"addr:postcode" - # suggestAlternative:"postal_code" - err.append({'class': 9002001, 'subclass': 1942523538, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - - # *[water=intermittent] - if (u'water' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'intermittent')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'unclassified')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'undefined')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"intermittent=yes" - # fixAdd:"intermittent=yes" - # fixRemove:"water" - err.append({'class': 9002001, 'subclass': 813530321, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'intermittent',u'yes']]), - '-': ([ - u'water']) - }}) - - # *[landuse=farm] - if (u'landuse' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'farm')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'unknown')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"landuse=farmland" - # suggestAlternative:"landuse=farmyard" - err.append({'class': 9002001, 'subclass': 1968473048, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[seamark=buoy]["seamark:type"=~/^(buoy_cardinal|buoy_installation|buoy_isolated_danger|buoy_lateral|buoy_safe_water|buoy_special_purpose|mooring)$/] - if (u'seamark' in keys and u'seamark:type' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'seamark') == mapcss._value_capture(capture_tags, 0, u'buoy') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_61b0be1b), mapcss._tag_capture(capture_tags, 1, tags, u'seamark:type'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'unidentified')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"{1.tag}" - # fixRemove:"seamark" - err.append({'class': 9002001, 'subclass': 1224401740, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '-': ([ - u'seamark']) - }}) + # throwWarning:tr("{0} is not a building type.","{0.tag}") + err.append({'class': 9002001, 'subclass': 159699040, 'text': mapcss.tr(u'{0} is not a building type.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[seamark=buoy]["seamark:type"!~/^(buoy_cardinal|buoy_installation|buoy_isolated_danger|buoy_lateral|buoy_safe_water|buoy_special_purpose|mooring)$/] - if (u'seamark' in keys): + # relation[water=salt] + if (u'water' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'seamark') == mapcss._value_capture(capture_tags, 0, u'buoy') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_61b0be1b, u'^(buoy_cardinal|buoy_installation|buoy_isolated_danger|buoy_lateral|buoy_safe_water|buoy_special_purpose|mooring)$'), mapcss._tag_capture(capture_tags, 1, tags, u'seamark:type'))) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'salt')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"{1.tag}" - err.append({'class': 9002001, 'subclass': 1481035998, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"landuse=salt_pond" + # suggestAlternative:"salt=yes" + err.append({'class': 9002001, 'subclass': 1845964412, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[landuse=conservation] - if (u'landuse' in keys): + # *[amenity=toilet] + if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'conservation')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'toilet')) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"boundary=protected_area" - # fixAdd:"boundary=protected_area" - # fixRemove:"landuse" - err.append({'class': 9002001, 'subclass': 824801072, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # group:tr("misspelled value") + # throwError:tr("{0}","{0.tag}") + # suggestAlternative:"amenity=toilets" + # fixAdd:"amenity=toilets" + err.append({'class': 9002018, 'subclass': 440018606, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'boundary',u'protected_area']]), - '-': ([ - u'landuse']) + [u'amenity',u'toilets']]) }}) - # *[amenity=kiosk] - if (u'amenity' in keys): + # *[man_made=MDF] + # *[man_made=telephone_exchange] + if (u'man_made' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'kiosk')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'MDF')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'telephone_exchange')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=kiosk" - # fixChangeKey:"amenity => shop" - err.append({'class': 9002001, 'subclass': 1331930630, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"telecom=exchange" + # fixRemove:"man_made" + # fixAdd:"telecom=exchange" + err.append({'class': 9002001, 'subclass': 634698090, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'shop', mapcss.tag(tags, u'amenity')]]), + [u'telecom',u'exchange']]), '-': ([ - u'amenity']) + u'man_made']) }}) - # *[amenity=shop] - if (u'amenity' in keys): + # *[building=central_office] + if (u'building' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'shop')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'central_office')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=*" - err.append({'class': 9002001, 'subclass': 1562207150, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"telecom=exchange" + # fixAdd:"building=yes" + # fixAdd:"telecom=exchange" + err.append({'class': 9002001, 'subclass': 1091970270, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'building',u'yes'], + [u'telecom',u'exchange']]) + }}) - # *[shop=fishmonger] - if (u'shop' in keys): + # *[telecom=central_office] + if (u'telecom' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'fishmonger')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'telecom') == mapcss._value_capture(capture_tags, 0, u'central_office')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=seafood" - # fixAdd:"shop=seafood" - err.append({'class': 9002001, 'subclass': 1376789416, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"telecom=exchange" + # fixAdd:"telecom=exchange" + err.append({'class': 9002001, 'subclass': 1503278830, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'shop',u'seafood']]) + [u'telecom',u'exchange']]) }}) - # *[shop=fish] - if (u'shop' in keys): + # *[natural=waterfall] + if (u'natural' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'fish')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'waterfall')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=fishing" - # suggestAlternative:"shop=pet" - # suggestAlternative:"shop=seafood" - err.append({'class': 9002001, 'subclass': 47191734, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"waterway=waterfall" + # fixChangeKey:"natural => waterway" + err.append({'class': 9002001, 'subclass': 764711734, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'waterway', mapcss.tag(tags, u'natural')]]), + '-': ([ + u'natural']) + }}) - # *[shop=betting] - if (u'shop' in keys): + # *[religion=unitarian] + if (u'religion' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'betting')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'religion') == mapcss._value_capture(capture_tags, 0, u'unitarian')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=casino" - # suggestAlternative:"amenity=gambling" - # suggestAlternative:"leisure=adult_gaming_centre" - # suggestAlternative:"leisure=amusement_arcade" - # suggestAlternative:"shop=bookmaker" - # suggestAlternative:"shop=lottery" - err.append({'class': 9002001, 'subclass': 1035501389, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"religion=unitarian_universalist" + # fixAdd:"religion=unitarian_universalist" + err.append({'class': 9002001, 'subclass': 9227331, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'religion',u'unitarian_universalist']]) + }}) - # *[shop=perfume] + # *[shop=shopping_centre] if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'perfume')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'shopping_centre')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=perfumery" - # fixAdd:"shop=perfumery" - err.append({'class': 9002001, 'subclass': 2075099676, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"shop=mall" + # fixAdd:"shop=mall" + err.append({'class': 9002001, 'subclass': 1448390566, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'shop',u'perfumery']]) + [u'shop',u'mall']]) }}) - # *[amenity=exercise_point] - if (u'amenity' in keys): + # *[is_in] + if (u'is_in' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'exercise_point')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'is_in')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leisure=fitness_station" - # fixRemove:"amenity" - # fixAdd:"leisure=fitness_station" - err.append({'class': 9002001, 'subclass': 1514920202, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'leisure',u'fitness_station']]), + # throwWarning:tr("{0} is deprecated","{0.key}") + # fixRemove:"{0.key}" + err.append({'class': 9002001, 'subclass': 981454091, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { '-': ([ - u'amenity']) + mapcss._tag_uncapture(capture_tags, u'{0.key}')]) }}) - # *[shop=auto_parts] - if (u'shop' in keys): + # *[sport=football] + if (u'sport' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'auto_parts')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'football')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=car_parts" - # fixAdd:"shop=car_parts" - err.append({'class': 9002001, 'subclass': 1675828779, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'shop',u'car_parts']]) - }}) + # suggestAlternative:"sport=american_football" + # suggestAlternative:"sport=australian_football" + # suggestAlternative:"sport=canadian_football" + # suggestAlternative:"sport=gaelic_games" + # suggestAlternative:"sport=rugby_league" + # suggestAlternative:"sport=rugby_union" + # suggestAlternative:"sport=soccer" + err.append({'class': 9002001, 'subclass': 73038577, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[amenity=car_repair] - if (u'amenity' in keys): + # *[leisure=common] + if (u'leisure' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'car_repair')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'common')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=car_repair" - # fixChangeKey:"amenity => shop" - err.append({'class': 9002001, 'subclass': 1681273585, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'shop', mapcss.tag(tags, u'amenity')]]), - '-': ([ - u'amenity']) - }}) + # suggestAlternative:"designation=common" + # suggestAlternative:"landuse=*" + # suggestAlternative:"leisure=*" + err.append({'class': 9002001, 'subclass': 157636301, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[amenity=studio][type=audio] - # *[amenity=studio][type=radio] - # *[amenity=studio][type=television] - # *[amenity=studio][type=video] - if (u'amenity' in keys and u'type' in keys): + # *[cuisine=vegan] + # *[cuisine=vegetarian] + if (u'cuisine' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'audio')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'radio')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'television')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'cuisine') == mapcss._value_capture(capture_tags, 0, u'vegan')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'studio') and mapcss._tag_capture(capture_tags, 1, tags, u'type') == mapcss._value_capture(capture_tags, 1, u'video')) - except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated for {1}","{1.key}","{0.tag}") - # suggestAlternative:"studio" - # fixChangeKey:"type => studio" - err.append({'class': 9002001, 'subclass': 413401822, 'text': mapcss.tr(u'{0} is deprecated for {1}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'studio', mapcss.tag(tags, u'type')]]), - '-': ([ - u'type']) - }}) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'cuisine') == mapcss._value_capture(capture_tags, 0, u'vegetarian')) + except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # suggestAlternative:concat("diet:","{0.value}","=only") + # suggestAlternative:concat("diet:","{0.value}","=yes") + # throwWarning:tr("{0} is deprecated","{0.tag}") + err.append({'class': 9002001, 'subclass': 43604574, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[power=cable_distribution_cabinet] - if (u'power' in keys): + # *[kitchen_hours] + if (u'kitchen_hours' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'cable_distribution_cabinet')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kitchen_hours')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"man_made=street_cabinet + street_cabinet=*" - # fixAdd:"man_made=street_cabinet" - # fixRemove:"power" - err.append({'class': 9002001, 'subclass': 1007567078, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"opening_hours:kitchen" + # fixChangeKey:"kitchen_hours => opening_hours:kitchen" + err.append({'class': 9002001, 'subclass': 1088306802, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'man_made',u'street_cabinet']]), + [u'opening_hours:kitchen', mapcss.tag(tags, u'kitchen_hours')]]), '-': ([ - u'power']) + u'kitchen_hours']) }}) - # *[power][location=kiosk] - if (u'location' in keys and u'power' in keys): + # *[shop=money_transfer] + if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') and mapcss._tag_capture(capture_tags, 1, tags, u'location') == mapcss._value_capture(capture_tags, 1, u'kiosk')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'money_transfer')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{1.tag}") - # fixRemove:"location" - # fixAdd:"man_made=street_cabinet" - # fixAdd:"street_cabinet=power" - err.append({'class': 9002001, 'subclass': 182905067, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{1.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"amenity=money_transfer" + # fixChangeKey:"shop => amenity" + err.append({'class': 9002001, 'subclass': 1664997936, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'man_made',u'street_cabinet'], - [u'street_cabinet',u'power']]), + [u'amenity', mapcss.tag(tags, u'shop')]]), '-': ([ - u'location']) + u'shop']) }}) - # *[man_made=well] - if (u'man_made' in keys): + # *[contact:google_plus] + if (u'contact:google_plus' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'well')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'contact:google_plus')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"man_made=petroleum_well" - # suggestAlternative:"man_made=water_well" - err.append({'class': 9002001, 'subclass': 1740864107, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # fixRemove:"contact:google_plus" + err.append({'class': 9002001, 'subclass': 1869461154, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '-': ([ + u'contact:google_plus']) + }}) - # *[amenity=dog_bin] - # *[amenity=dog_waste_bin] + # *[amenity=garages] + # *[amenity=garage] if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'dog_bin')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'garages')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'dog_waste_bin')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'garage')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") + # suggestAlternative:concat("building=","{0.value}") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=waste_basket + waste=dog_excrement + vending=excrement_bags" - # fixAdd:"amenity=waste_basket" - # fixAdd:"vending=excrement_bags" - # fixAdd:"waste=dog_excrement" - err.append({'class': 9002001, 'subclass': 2091877281, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'amenity',u'waste_basket'], - [u'vending',u'excrement_bags'], - [u'waste',u'dog_excrement']]) - }}) + # suggestAlternative:"amenity=parking + parking=garage_boxes" + # suggestAlternative:"landuse=garages" + err.append({'class': 9002001, 'subclass': 863228118, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[amenity=artwork] - if (u'amenity' in keys): + # *[shop=winery] + # *[amenity=winery] + if (u'amenity' in keys) or (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'artwork')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'winery')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'winery')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"tourism=artwork" - # fixRemove:"amenity" - # fixAdd:"tourism=artwork" - err.append({'class': 9002001, 'subclass': 728429076, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'tourism',u'artwork']]), - '-': ([ - u'amenity']) - }}) + # suggestAlternative:"craft=winery" + # suggestAlternative:"shop=wine" + err.append({'class': 9002001, 'subclass': 1773574987, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[amenity=community_center] + # *[amenity=youth_centre] if (u'amenity' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'community_center')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'youth_centre')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=community_centre" + # suggestAlternative:"amenity=community_centre + community_centre=youth_centre" # fixAdd:"amenity=community_centre" - err.append({'class': 9002001, 'subclass': 690512681, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # fixAdd:"community_centre=youth_centre" + err.append({'class': 9002001, 'subclass': 1284929085, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'amenity',u'community_centre']]) + [u'amenity',u'community_centre'], + [u'community_centre',u'youth_centre']]) }}) - # *[man_made=cut_line] - if (u'man_made' in keys): + # *[building:type][building=yes] + # *[building:type][!building] + if (u'building' in keys and u'building:type' in keys) or (u'building:type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'cut_line')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building:type') and mapcss._tag_capture(capture_tags, 1, tags, u'building') == mapcss._value_capture(capture_tags, 1, u'yes')) except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"man_made=cutline" - # fixAdd:"man_made=cutline" - err.append({'class': 9002001, 'subclass': 1008752382, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'man_made',u'cutline']]) - }}) - - # *[amenity=park] - if (u'amenity' in keys): - match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'park')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building:type') and not mapcss._tag_capture(capture_tags, 1, tags, u'building')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leisure=park" - # fixRemove:"amenity" - # fixAdd:"leisure=park" - err.append({'class': 9002001, 'subclass': 2085280194, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"building" + # fixChangeKey:"building:type => building" + err.append({'class': 9002001, 'subclass': 1927794430, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'leisure',u'park']]), + [u'building', mapcss.tag(tags, u'building:type')]]), '-': ([ - u'amenity']) + u'building:type']) }}) - # *[amenity=hotel] - if (u'amenity' in keys): + # *[building:type][building][building!=yes] + if (u'building' in keys and u'building:type' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'hotel')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building:type') and mapcss._tag_capture(capture_tags, 1, tags, u'building') and mapcss._tag_capture(capture_tags, 2, tags, u'building') != mapcss._value_const_capture(capture_tags, 2, u'yes', u'yes')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"tourism=hotel" - # fixRemove:"amenity" - # fixAdd:"tourism=hotel" - err.append({'class': 9002001, 'subclass': 1341786818, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'tourism',u'hotel']]), - '-': ([ - u'amenity']) - }}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"building" + err.append({'class': 9002001, 'subclass': 1133239698, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[shop=window] - # *[shop=windows] - if (u'shop' in keys): + # *[escalator] + if (u'escalator' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'window')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'windows')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'escalator')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"craft=window_construction" - # fixAdd:"craft=window_construction" - # fixRemove:"shop" - err.append({'class': 9002001, 'subclass': 532391183, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'craft',u'window_construction']]), - '-': ([ - u'shop']) - }}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"highway=steps + conveying=*" + err.append({'class': 9002001, 'subclass': 967271828, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[amenity=education] - if (u'amenity' in keys): + # *[fenced] + if (u'fenced' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'education')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'fenced')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=college" - # suggestAlternative:"amenity=school" - # suggestAlternative:"amenity=university" - err.append({'class': 9002001, 'subclass': 796960259, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"barrier=fence" + err.append({'class': 9002001, 'subclass': 1141285220, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[shop=gallery] - if (u'shop' in keys): + # *[historic_name][!old_name] + if (u'historic_name' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'gallery')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'historic_name') and not mapcss._tag_capture(capture_tags, 1, tags, u'old_name')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=art" - # fixAdd:"shop=art" - err.append({'class': 9002001, 'subclass': 1319611546, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"old_name" + # fixChangeKey:"historic_name => old_name" + err.append({'class': 9002001, 'subclass': 1034538127, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'shop',u'art']]) + [u'old_name', mapcss.tag(tags, u'historic_name')]]), + '-': ([ + u'historic_name']) }}) - # *[shop=gambling] - # *[leisure=gambling] - if (u'leisure' in keys) or (u'shop' in keys): + # *[historic_name][old_name] + if (u'historic_name' in keys and u'old_name' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'gambling')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'gambling')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'historic_name') and mapcss._tag_capture(capture_tags, 1, tags, u'old_name')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"amenity=casino" - # suggestAlternative:"amenity=gambling" - # suggestAlternative:"leisure=amusement_arcade" - # suggestAlternative:"shop=bookmaker" - # suggestAlternative:"shop=lottery" - err.append({'class': 9002001, 'subclass': 1955724853, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"old_name" + err.append({'class': 9002001, 'subclass': 30762614, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[office=real_estate_agent] - if (u'office' in keys): + # *[landuse=field] + if (u'landuse' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'office') == mapcss._value_capture(capture_tags, 0, u'real_estate_agent')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'landuse') == mapcss._value_capture(capture_tags, 0, u'field')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"office=estate_agent " - # fixAdd:"office=estate_agent " - err.append({'class': 9002001, 'subclass': 1340846055, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"landuse=farmland" + # fixAdd:"landuse=farmland" + err.append({'class': 9002001, 'subclass': 426261497, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'office',u'estate_agent']]) + [u'landuse',u'farmland']]) }}) - # *[shop=glass] - if (u'shop' in keys): + # *[leisure=beach] + if (u'leisure' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'glass')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'beach')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"craft=glaziery" - # suggestAlternative:"shop=glaziery" - err.append({'class': 9002001, 'subclass': 712020531, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"leisure=beach_resort" + # suggestAlternative:"natural=beach" + err.append({'class': 9002001, 'subclass': 1767286055, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[amenity=proposed] - # *[amenity=proposed] - # *[amenity=disused] - # *[shop=disused] - # *[historic=abandoned] - if (u'amenity' in keys) or (u'historic' in keys) or (u'shop' in keys): + # *[leisure=club] + if (u'leisure' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'proposed')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'proposed')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'disused')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'disused')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'historic') == mapcss._value_capture(capture_tags, 0, u'abandoned')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'club')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated. Use the {1}: key prefix instead.","{0.tag}","{0.value}") - err.append({'class': 9002001, 'subclass': 283558204, 'text': mapcss.tr(u'{0} is deprecated. Use the {1}: key prefix instead.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'), mapcss._tag_uncapture(capture_tags, u'{0.value}'))}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"club=*" + err.append({'class': 9002001, 'subclass': 1282397509, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[amenity=swimming_pool] - if (u'amenity' in keys): + # *[leisure=video_arcade] + if (u'leisure' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'swimming_pool')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'video_arcade')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leisure=swimming_pool" - # fixChangeKey:"amenity => leisure" - err.append({'class': 9002001, 'subclass': 2012807801, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'leisure', mapcss.tag(tags, u'amenity')]]), - '-': ([ - u'amenity']) - }}) + # suggestAlternative:"leisure=adult_gaming_centre" + # suggestAlternative:"leisure=amusement_arcade" + err.append({'class': 9002001, 'subclass': 1463909830, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[amenity=sauna] - if (u'amenity' in keys): + # *[man_made=jetty] + if (u'man_made' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'sauna')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'jetty')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"leisure=sauna" - # fixChangeKey:"amenity => leisure" - err.append({'class': 9002001, 'subclass': 1450116742, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"man_made=pier" + # fixAdd:"man_made=pier" + err.append({'class': 9002001, 'subclass': 192707176, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'leisure', mapcss.tag(tags, u'amenity')]]), - '-': ([ - u'amenity']) + [u'man_made',u'pier']]) }}) - - # *[/^[^t][^i][^g].+_[0-9]$/][!/^note_[0-9]$/][!/^description_[0-9]$/] - if True: - match = False - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, self.re_300dfa36) and not mapcss._tag_capture(capture_tags, 1, tags, self.re_3185ac6d) and not mapcss._tag_capture(capture_tags, 2, tags, self.re_6d27b157)) - except mapcss.RuleAbort: pass - if match: - # group:tr("questionable key (ending with a number)") - # throwWarning:tr("{0}","{0.key}") - err.append({'class': 9002014, 'subclass': 2081989305, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - - # *[sport=skating] - if (u'sport' in keys): + + # *[man_made=village_pump] + if (u'man_made' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'skating')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'village_pump')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"sport=ice_skating" - # suggestAlternative:"sport=roller_skating" - err.append({'class': 9002001, 'subclass': 170699177, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"man_made=water_well" + # fixAdd:"man_made=water_well" + err.append({'class': 9002001, 'subclass': 423232686, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'man_made',u'water_well']]) + }}) - # *[amenity=public_building] - if (u'amenity' in keys): + # *[man_made=water_tank] + if (u'man_made' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'public_building')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'water_tank')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"..." - # suggestAlternative:"amenity=community_centre" - # suggestAlternative:"amenity=hospital" - # suggestAlternative:"amenity=townhall" - # suggestAlternative:"building=hospital" - # suggestAlternative:"building=public" - # suggestAlternative:"leisure=sports_centre" - # suggestAlternative:"office=government" - err.append({'class': 9002001, 'subclass': 1295642010, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"man_made=storage_tank + content=water" + # fixAdd:"content=water" + # fixAdd:"man_made=storage_tank" + err.append({'class': 9002001, 'subclass': 563629665, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'content',u'water'], + [u'man_made',u'storage_tank']]) + }}) - # *[vending=news_papers] - if (u'vending' in keys): + # *[natural=moor] + if (u'natural' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'vending') == mapcss._value_capture(capture_tags, 0, u'news_papers')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'moor')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"vending=newspapers" - # fixAdd:"vending=newspapers" - err.append({'class': 9002001, 'subclass': 1133820292, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'vending',u'newspapers']]) - }}) + # suggestAlternative:"landuse=meadow + meadow=agricultural" + # suggestAlternative:"natural=fell" + # suggestAlternative:"natural=grassland" + # suggestAlternative:"natural=heath" + # suggestAlternative:"natural=scrub" + # suggestAlternative:"natural=tundra" + # suggestAlternative:"natural=wetland" + err.append({'class': 9002001, 'subclass': 374637717, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[service=drive_through] - if (u'service' in keys): + # *[noexit=no][!fixme] + if (u'noexit' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'service') == mapcss._value_capture(capture_tags, 0, u'drive_through')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'noexit') == mapcss._value_capture(capture_tags, 0, u'no') and not mapcss._tag_capture(capture_tags, 1, tags, u'fixme')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"service=drive-through" - # fixAdd:"service=drive-through" - err.append({'class': 9002001, 'subclass': 283545650, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"fixme=continue" + # fixAdd:"fixme=continue" + # fixRemove:"noexit" + err.append({'class': 9002001, 'subclass': 647435126, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'service',u'drive-through']]) + [u'fixme',u'continue']]), + '-': ([ + u'noexit']) }}) - # *[name:botanical] - if (u'name:botanical' in keys): + # *[noexit=no][fixme] + if (u'fixme' in keys and u'noexit' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name:botanical')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'noexit') == mapcss._value_capture(capture_tags, 0, u'no') and mapcss._tag_capture(capture_tags, 1, tags, u'fixme')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"species" - err.append({'class': 9002001, 'subclass': 1061429000, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"fixme=continue" + err.append({'class': 9002001, 'subclass': 881828009, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[shop=souvenir] - # *[shop=souvenirs] - # *[shop=souveniers] + # *[shop=dive] if (u'shop' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'souvenir')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'dive')) except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"shop=scuba_diving" + # fixAdd:"shop=scuba_diving" + err.append({'class': 9002001, 'subclass': 1582968978, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'shop',u'scuba_diving']]) + }}) + + # *[shop=furnace] + if (u'shop' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'souvenirs')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'furnace')) except mapcss.RuleAbort: pass + if match: + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"craft=plumber" + # suggestAlternative:"shop=fireplace" + err.append({'class': 9002001, 'subclass': 1155821104, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # *[sport=paragliding] + if (u'sport' in keys): + match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'souveniers')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'paragliding')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=gift" - # fixAdd:"shop=gift" - err.append({'class': 9002001, 'subclass': 1794702946, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"sport=free_flying" + # fixAdd:"sport=free_flying" + err.append({'class': 9002001, 'subclass': 1531788430, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'shop',u'gift']]) + [u'sport',u'free_flying']]) }}) - # *[vending=animal_food] - if (u'vending' in keys): + # *[tourism=bed_and_breakfast] + if (u'tourism' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'vending') == mapcss._value_capture(capture_tags, 0, u'animal_food')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'tourism') == mapcss._value_capture(capture_tags, 0, u'bed_and_breakfast')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"vending=animal_feed" - # fixAdd:"vending=animal_feed" - err.append({'class': 9002001, 'subclass': 1077411296, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"tourism=guest_house + guest_house=bed_and_breakfast" + # fixAdd:"guest_house=bed_and_breakfast" + # fixAdd:"tourism=guest_house" + err.append({'class': 9002001, 'subclass': 954237438, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'vending',u'animal_feed']]) + [u'guest_house',u'bed_and_breakfast'], + [u'tourism',u'guest_house']]) }}) - # *[amenity=hunting_stand][lock=yes] - # *[amenity=hunting_stand][lock=no] - if (u'amenity' in keys and u'lock' in keys): + # *[diaper=yes] + # *[diaper=no] + if (u'diaper' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'hunting_stand') and mapcss._tag_capture(capture_tags, 1, tags, u'lock') == mapcss._value_capture(capture_tags, 1, u'yes')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'hunting_stand') and mapcss._tag_capture(capture_tags, 1, tags, u'lock') == mapcss._value_capture(capture_tags, 1, u'no')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper') == mapcss._value_capture(capture_tags, 0, u'no')) except mapcss.RuleAbort: pass if match: + # setdiaper_checked # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated for {1}","{1.key}","{0.tag}") - # suggestAlternative:"lockable" - # fixChangeKey:"lock => lockable" - err.append({'class': 9002001, 'subclass': 1939599742, 'text': mapcss.tr(u'{0} is deprecated for {1}', mapcss._tag_uncapture(capture_tags, u'{1.key}'), mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:concat("changing_table=","{0.value}") + # throwWarning:tr("{0} is deprecated","{0.tag}") + # fixChangeKey:"diaper => changing_table" + set_diaper_checked = True + err.append({'class': 9002001, 'subclass': 1957125311, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'lockable', mapcss.tag(tags, u'lock')]]), + [u'changing_table', mapcss.tag(tags, u'diaper')]]), '-': ([ - u'lock']) + u'diaper']) }}) - # *[amenity=advertising][!advertising] - if (u'amenity' in keys): - match = False - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'advertising') and not mapcss._tag_capture(capture_tags, 1, tags, u'advertising')) - except mapcss.RuleAbort: pass - if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"advertising=*" - err.append({'class': 9002001, 'subclass': 1696784412, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - - # *[amenity=advertising][advertising] - if (u'advertising' in keys and u'amenity' in keys): + # *[diaper][diaper=~/^[1-9][0-9]*$/] + if (u'diaper' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'advertising') and mapcss._tag_capture(capture_tags, 1, tags, u'advertising')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_0f294fdf), mapcss._tag_capture(capture_tags, 1, tags, u'diaper'))) except mapcss.RuleAbort: pass if match: + # setdiaper_checked # group:tr("deprecated tagging") + # suggestAlternative:concat("changing_table=yes + changing_table:count=","{0.value}") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"advertising=*" - # fixRemove:"amenity" - err.append({'class': 9002001, 'subclass': 1538706366, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # fixAdd:"changing_table=yes" + # fixChangeKey:"diaper => changing_table:count" + set_diaper_checked = True + err.append({'class': 9002001, 'subclass': 2105051472, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'changing_table',u'yes'], + [u'changing_table:count', mapcss.tag(tags, u'diaper')]]), '-': ([ - u'amenity']) + u'diaper']) }}) - # relation[water=salt] - if (u'water' in keys): + # *[diaper=room] + if (u'diaper' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') == mapcss._value_capture(capture_tags, 0, u'salt')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper') == mapcss._value_capture(capture_tags, 0, u'room')) except mapcss.RuleAbort: pass if match: + # setdiaper_checked # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"landuse=salt_pond" - # suggestAlternative:"salt=yes" - err.append({'class': 9002001, 'subclass': 1845964412, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"changing_table=dedicated_room" + # suggestAlternative:"changing_table=room" + set_diaper_checked = True + err.append({'class': 9002001, 'subclass': 883202329, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[amenity=toilet] - if (u'amenity' in keys): + # *[diaper]!.diaper_checked + if (u'diaper' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'amenity') == mapcss._value_capture(capture_tags, 0, u'toilet')) + try: match = (not set_diaper_checked and mapcss._tag_capture(capture_tags, 0, tags, u'diaper')) except mapcss.RuleAbort: pass if match: - # group:tr("misspelled value") - # throwError:tr("{0}","{0.tag}") - # suggestAlternative:"amenity=toilets" - # fixAdd:"amenity=toilets" - err.append({'class': 9002018, 'subclass': 440018606, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'amenity',u'toilets']]) - }}) + # group:tr("deprecated tagging") + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"changing_table" + err.append({'class': 9002001, 'subclass': 693675339, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) - # *[man_made=MDF] - # *[man_made=telephone_exchange] - if (u'man_made' in keys): + # *[diaper:male=yes] + if (u'diaper:male' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'MDF')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'man_made') == mapcss._value_capture(capture_tags, 0, u'telephone_exchange')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:male') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if match: + # setdiaper___checked # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"telecom=exchange" - # fixRemove:"man_made" - # fixAdd:"telecom=exchange" - err.append({'class': 9002001, 'subclass': 634698090, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"changing_table:location=male_toilet" + # fixAdd:"changing_table:location=male_toilet" + # fixRemove:"diaper:male" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 799035479, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'telecom',u'exchange']]), + [u'changing_table:location',u'male_toilet']]), '-': ([ - u'man_made']) + u'diaper:male']) }}) - # *[building=central_office] - if (u'building' in keys): + # *[diaper:female=yes] + if (u'diaper:female' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'building') == mapcss._value_capture(capture_tags, 0, u'central_office')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:female') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if match: + # setdiaper___checked # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"telecom=exchange" - # fixAdd:"building=yes" - # fixAdd:"telecom=exchange" - err.append({'class': 9002001, 'subclass': 1091970270, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"changing_table:location=female_toilet" + # fixAdd:"changing_table:location=female_toilet" + # fixRemove:"diaper:female" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 1450901137, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'building',u'yes'], - [u'telecom',u'exchange']]) + [u'changing_table:location',u'female_toilet']]), + '-': ([ + u'diaper:female']) }}) - # *[telecom=central_office] - if (u'telecom' in keys): + # *[diaper:unisex=yes] + if (u'diaper:unisex' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'telecom') == mapcss._value_capture(capture_tags, 0, u'central_office')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:unisex') == mapcss._value_capture(capture_tags, 0, u'yes')) except mapcss.RuleAbort: pass if match: + # setdiaper___checked # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"telecom=exchange" - # fixAdd:"telecom=exchange" - err.append({'class': 9002001, 'subclass': 1503278830, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # suggestAlternative:"changing_table:location=unisex_toilet" + # fixAdd:"changing_table:location=unisex_toilet" + # fixRemove:"diaper:unisex" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 1460378712, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'telecom',u'exchange']]) + [u'changing_table:location',u'unisex_toilet']]), + '-': ([ + u'diaper:unisex']) }}) - # *[natural=waterfall] - if (u'natural' in keys): + # *[diaper:wheelchair=yes] + # *[diaper:wheelchair=no] + if (u'diaper:wheelchair' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'natural') == mapcss._value_capture(capture_tags, 0, u'waterfall')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:wheelchair') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:wheelchair') == mapcss._value_capture(capture_tags, 0, u'no')) except mapcss.RuleAbort: pass if match: + # setdiaper___checked # group:tr("deprecated tagging") + # suggestAlternative:concat("changing_table:wheelchair=","{0.value}") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"waterway=waterfall" - # fixChangeKey:"natural => waterway" - err.append({'class': 9002001, 'subclass': 764711734, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # fixChangeKey:"diaper:wheelchair => changing_table:wheelchair" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 1951967281, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'waterway', mapcss.tag(tags, u'natural')]]), + [u'changing_table:wheelchair', mapcss.tag(tags, u'diaper:wheelchair')]]), '-': ([ - u'natural']) + u'diaper:wheelchair']) }}) - # *[religion=unitarian] - if (u'religion' in keys): + # *[diaper:fee=yes] + # *[diaper:fee=no] + if (u'diaper:fee' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'religion') == mapcss._value_capture(capture_tags, 0, u'unitarian')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:fee') == mapcss._value_capture(capture_tags, 0, u'yes')) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'diaper:fee') == mapcss._value_capture(capture_tags, 0, u'no')) except mapcss.RuleAbort: pass if match: + # setdiaper___checked # group:tr("deprecated tagging") + # suggestAlternative:concat("changing_table:fee=","{0.value}") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"religion=unitarian_universalist" - # fixAdd:"religion=unitarian_universalist" - err.append({'class': 9002001, 'subclass': 9227331, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + # fixChangeKey:"diaper:fee => changing_table:fee" + set_diaper___checked = True + err.append({'class': 9002001, 'subclass': 2008573526, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'religion',u'unitarian_universalist']]) + [u'changing_table:fee', mapcss.tag(tags, u'diaper:fee')]]), + '-': ([ + u'diaper:fee']) }}) - # *[shop=shopping_centre] - if (u'shop' in keys): + # *[/^diaper:/]!.diaper___checked + if True: match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'shop') == mapcss._value_capture(capture_tags, 0, u'shopping_centre')) + try: match = (not set_diaper___checked and mapcss._tag_capture(capture_tags, 0, tags, self.re_6029fe03)) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"shop=mall" - # fixAdd:"shop=mall" - err.append({'class': 9002001, 'subclass': 1448390566, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { - '+': dict([ - [u'shop',u'mall']]) - }}) + # throwWarning:tr("{0} is deprecated","diaper:*") + # suggestAlternative:"changing_table:*" + err.append({'class': 9002001, 'subclass': 26578864, 'text': mapcss.tr(u'{0} is deprecated', u'diaper:*')}) - # *[is_in] - if (u'is_in' in keys): + # *[changing_table][changing_table!~/^(yes|no|limited)$/] + if (u'changing_table' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'is_in')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'changing_table') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_787405b1, u'^(yes|no|limited)$'), mapcss._tag_capture(capture_tags, 1, tags, u'changing_table'))) except mapcss.RuleAbort: pass if match: - # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # fixRemove:"{0.key}" - err.append({'class': 9002001, 'subclass': 981454091, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { - '-': ([ - mapcss._tag_uncapture(capture_tags, u'{0.key}')]) - }}) + # throwWarning:tr("wrong value: {0}","{0.tag}") + # suggestAlternative:"changing_table=limited" + # suggestAlternative:"changing_table=no" + # suggestAlternative:"changing_table=yes" + err.append({'class': 9002019, 'subclass': 1965225408, 'text': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) - # *[sport=football] - if (u'sport' in keys): + # *[roof:shape=half_hipped] + if (u'roof:shape' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'sport') == mapcss._value_capture(capture_tags, 0, u'football')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'roof:shape') == mapcss._value_capture(capture_tags, 0, u'half_hipped')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"sport=american_football" - # suggestAlternative:"sport=australian_football" - # suggestAlternative:"sport=canadian_football" - # suggestAlternative:"sport=gaelic_games" - # suggestAlternative:"sport=rugby_league" - # suggestAlternative:"sport=rugby_union" - # suggestAlternative:"sport=soccer" - err.append({'class': 9002001, 'subclass': 73038577, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"roof:shape=half-hipped" + # fixAdd:"roof:shape=half-hipped" + err.append({'class': 9002001, 'subclass': 1548347123, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'roof:shape',u'half-hipped']]) + }}) - # *[leisure=common] - if (u'leisure' in keys): + # *[bridge_name] + if (u'bridge_name' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'leisure') == mapcss._value_capture(capture_tags, 0, u'common')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'bridge_name')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.tag}") - # suggestAlternative:"designation=common" - # suggestAlternative:"landuse=*" - # suggestAlternative:"leisure=*" - err.append({'class': 9002001, 'subclass': 157636301, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # throwWarning:tr("{0} is deprecated","{0.key}") + # suggestAlternative:"bridge:name" + # fixChangeKey:"bridge_name => bridge:name" + err.append({'class': 9002001, 'subclass': 80069399, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'bridge:name', mapcss.tag(tags, u'bridge_name')]]), + '-': ([ + u'bridge_name']) + }}) - # *[cuisine=vegan] - # *[cuisine=vegetarian] - if (u'cuisine' in keys): + # *[access=public] + if (u'access' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'cuisine') == mapcss._value_capture(capture_tags, 0, u'vegan')) - except mapcss.RuleAbort: pass - if not match: - capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'cuisine') == mapcss._value_capture(capture_tags, 0, u'vegetarian')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'access') == mapcss._value_capture(capture_tags, 0, u'public')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # suggestAlternative:concat("diet:","{0.value}","=only") - # suggestAlternative:concat("diet:","{0.value}","=yes") # throwWarning:tr("{0} is deprecated","{0.tag}") - err.append({'class': 9002001, 'subclass': 43604574, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # suggestAlternative:"access=yes" + # fixAdd:"access=yes" + err.append({'class': 9002001, 'subclass': 1115157097, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + [u'access',u'yes']]) + }}) - # *[kitchen_hours] - if (u'kitchen_hours' in keys): + # *[crossing=island] + if (u'crossing' in keys): match = False if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'kitchen_hours')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'crossing') == mapcss._value_capture(capture_tags, 0, u'island')) except mapcss.RuleAbort: pass if match: # group:tr("deprecated tagging") - # throwWarning:tr("{0} is deprecated","{0.key}") - # suggestAlternative:"opening_hours:kitchen" - # fixChangeKey:"kitchen_hours => opening_hours:kitchen" - err.append({'class': 9002001, 'subclass': 1088306802, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.key}')), 'allow_fix_override': True, 'fix': { + # throwWarning:tr("{0} is deprecated","{0.tag}") + # suggestAlternative:"crossing:island=yes" + # fixRemove:"crossing" + # fixAdd:"crossing:island=yes" + err.append({'class': 9002001, 'subclass': 1512561318, 'text': mapcss.tr(u'{0} is deprecated', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '+': dict([ - [u'opening_hours:kitchen', mapcss.tag(tags, u'kitchen_hours')]]), + [u'crossing:island',u'yes']]), '-': ([ - u'kitchen_hours']) + u'crossing']) }}) return err @@ -8781,5 +11369,11 @@ class father: self.check_err(n.way(data, {u'name_1': u'foo'}, [0]), expected={'class': 9002014, 'subclass': 2081989305}) self.check_not_err(n.way(data, {u'note_2': u'foo'}, [0]), expected={'class': 9002014, 'subclass': 2081989305}) self.check_not_err(n.way(data, {u'tiger:name_base_1': u'bar'}, [0]), expected={'class': 9002014, 'subclass': 2081989305}) + self.check_not_err(n.way(data, {u'building': u'supermarket', u'building:type': u'church'}, [0]), expected={'class': 9002001, 'subclass': 1927794430}) + self.check_err(n.way(data, {u'building': u'yes', u'building:type': u'church'}, [0]), expected={'class': 9002001, 'subclass': 1927794430}) + self.check_err(n.way(data, {u'building:type': u'church'}, [0]), expected={'class': 9002001, 'subclass': 1927794430}) + self.check_err(n.way(data, {u'building': u'supermarket', u'building:type': u'church'}, [0]), expected={'class': 9002001, 'subclass': 1133239698}) + self.check_not_err(n.way(data, {u'building': u'yes', u'building:type': u'church'}, [0]), expected={'class': 9002001, 'subclass': 1133239698}) + self.check_not_err(n.way(data, {u'building:type': u'church'}, [0]), expected={'class': 9002001, 'subclass': 1133239698}) self.check_err(n.relation(data, {u'fo': u'bar'}, []), expected={'class': 9002012, 'subclass': 518970721}) self.check_not_err(n.relation(data, {u'to': u'Berlin'}, []), expected={'class': 9002012, 'subclass': 518970721}) diff --git a/plugins/Josm_geometry.py b/plugins/Josm_geometry.py index b6dd146d2..b466a2038 100644 --- a/plugins/Josm_geometry.py +++ b/plugins/Josm_geometry.py @@ -34,7 +34,7 @@ def node(self, data, tags): # node[oneway] # node[bridge] # node[sidewalk] - # node[footway] + # node[footway][footway!=crossing] # node[man_made=embankment] # node[man_made=groyne] # node[man_made=cutline] @@ -91,7 +91,7 @@ def node(self, data, tags): except mapcss.RuleAbort: pass if not match: capture_tags = {} - try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'footway')) + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'footway') and mapcss._tag_capture(capture_tags, 1, tags, u'footway') != mapcss._value_const_capture(capture_tags, 1, u'crossing', u'crossing')) except mapcss.RuleAbort: pass if not match: capture_tags = {} @@ -242,7 +242,7 @@ def node(self, data, tags): # assertMatch:"node bridge=viaduct" # assertMatch:"node bridge=yes" # assertMatch:"node oneway=-1" - err.append({'class': 9003001, 'subclass': 2132549655, 'text': mapcss.tr(u'{0} on a node. Should be used on a way.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + err.append({'class': 9003001, 'subclass': 431750003, 'text': mapcss.tr(u'{0} on a node. Should be used on a way.', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) # node[boundary=administrative] if (u'boundary' in keys): @@ -659,6 +659,6 @@ class father: n.init(None) data = {'id': 0, 'lat': 0, 'lon': 0} - self.check_err(n.node(data, {u'bridge': u'viaduct'}), expected={'class': 9003001, 'subclass': 2132549655}) - self.check_err(n.node(data, {u'bridge': u'yes'}), expected={'class': 9003001, 'subclass': 2132549655}) - self.check_err(n.node(data, {u'oneway': u'-1'}), expected={'class': 9003001, 'subclass': 2132549655}) + self.check_err(n.node(data, {u'bridge': u'viaduct'}), expected={'class': 9003001, 'subclass': 431750003}) + self.check_err(n.node(data, {u'bridge': u'yes'}), expected={'class': 9003001, 'subclass': 431750003}) + self.check_err(n.node(data, {u'oneway': u'-1'}), expected={'class': 9003001, 'subclass': 431750003}) diff --git a/plugins/Josm_highway.py b/plugins/Josm_highway.py index 572b4638e..4bee3789e 100644 --- a/plugins/Josm_highway.py +++ b/plugins/Josm_highway.py @@ -18,6 +18,7 @@ def init(self, logger): self.errors[9004006] = {'item': 9004, 'level': 3, 'tag': ["tag", "highway"], 'desc': mapcss.tr(u'deprecated tagging')} self.errors[9004007] = {'item': 9004, 'level': 3, 'tag': ["tag", "highway"], 'desc': mapcss.tr(u'Value of \'\'{0}\'\' should either be \'\'{1}\'\' or \'\'{2}\'\'. For sidewalks use \'\'{3}\'\' instead.', mapcss._tag_uncapture(capture_tags, u'{0.key}'), mapcss._tag_uncapture(capture_tags, u'{1.value}'), mapcss._tag_uncapture(capture_tags, u'{2.value}'), u'sidewalk=left|right|both|no')} self.errors[9004008] = {'item': 9004, 'level': 3, 'tag': ["tag", "highway"], 'desc': mapcss.tr(u'wrong highway tag on a node')} + self.errors[9004010] = {'item': 9004, 'level': 3, 'tag': ["tag", "highway"], 'desc': mapcss.tr(u'{0} on a node', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))} self.re_015aabd5 = re.compile(r'^(unclassified|residential|living_street|service)$') self.re_3092b7ac = re.compile(r'^.*_link$') @@ -62,6 +63,32 @@ def node(self, data, tags): # assertNoMatch:"node highway=turning_circle" err.append({'class': 9004008, 'subclass': 325492196, 'text': mapcss.tr(u'wrong highway tag on a node')}) + # node[footway=crossing] + if (u'footway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'footway') == mapcss._value_capture(capture_tags, 0, u'crossing')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("{0} on a node","{0.tag}") + # suggestAlternative:"highway=crossing" + # suggestAlternative:"railway=crossing" + err.append({'class': 9004010, 'subclass': 1262520638, 'text': mapcss.tr(u'{0} on a node', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + + # node[cycleway=crossing] + if (u'cycleway' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'cycleway') == mapcss._value_capture(capture_tags, 0, u'crossing')) + except mapcss.RuleAbort: pass + if match: + # throwWarning:tr("{0} on a node","{0.tag}") + # suggestAlternative:"highway=crossing + bicycle=yes" + # suggestAlternative:"railway=crossing + bicycle=yes" + err.append({'class': 9004010, 'subclass': 1385847744, 'text': mapcss.tr(u'{0} on a node', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # node[railway!=crossing][crossing!=no].is_in_railway.is_in_minor_road!.is_in_major_road # Use undeclared class is_in_major_road, is_in_minor_road, is_in_railway diff --git a/plugins/Josm_numeric.py b/plugins/Josm_numeric.py index a95dcae65..077706f9b 100644 --- a/plugins/Josm_numeric.py +++ b/plugins/Josm_numeric.py @@ -25,6 +25,7 @@ def init(self, logger): self.errors[9006019] = {'item': 9006, 'level': 3, 'tag': ["tag", "value"], 'desc': mapcss.tr(u'unusual value of {0}: tonne is default; point is decimal separator; if units, put space then unit', mapcss._tag_uncapture(capture_tags, u'{0.key}'))} self.errors[9006020] = {'item': 9006, 'level': 3, 'tag': ["tag", "value"], 'desc': mapcss.tr(u'unusual value of {0}: kilometers is default; point is decimal separator; if units, put space then unit', mapcss._tag_uncapture(capture_tags, u'{0.key}'))} self.errors[9006021] = {'item': 9006, 'level': 3, 'tag': ["tag", "value"], 'desc': mapcss.tr(u'Unnecessary amount of decimal places')} + self.errors[9006022] = {'item': 9006, 'level': 3, 'tag': ["tag", "value"], 'desc': mapcss.tr(u'Airport tagging')} self.re_035d45f0 = re.compile(r'^(([0-9]+\.?[0-9]*( (t|kg|lbs))?)|([0-9]+\'[0-9]+\.?[0-9]*\"))$') self.re_066203d3 = re.compile(r'^[0-9]+$') @@ -50,7 +51,10 @@ def init(self, logger): self.re_597f003d = re.compile(r'^(([0-9]+\.?[0-9]*( (m|ft))?)|([1-9][0-9]*\'((10|11|[0-9])((\.[0-9]+)?)\")?))$') self.re_5a7f47b9 = re.compile(r'^-?[0-9]+\.[0-9][0-9][0-9]+$') self.re_63a07204 = re.compile(r'^([0-9][0-9]?[0-9]?|north|east|south|west|N|E|S|W|NE|SE|SW|NW|NNE|ENE|ESE|SSE|SSW|WSW|WNW|NNW|forward|backward|both|clockwise|anti-clockwise|anticlockwise|up|down)(-([0-9][0-9]?[0-9]?|N|E|S|W|NE|SE|SW|NW|NNE|ENE|ESE|SSE|SSW|WSW|WNW|NNW))?(;([0-9][0-9]?[0-9]?|N|E|S|W|NE|SE|SW|NW|NNE|ENE|ESE|SSE|SSW|WSW|WNW|NNW)-([0-9][0-9]?[0-9]?|N|E|S|W|NE|SE|SW|NW|NNE|ENE|ESE|SSE|SSW|WSW|WNW|NNW))*$') + self.re_6aa93c30 = re.compile(r'^[A-Z]{3}$') self.re_762a1d1d = re.compile(r'^-?[0-9]+(\.[0-9]+)? ?m$') + self.re_7afc6883 = re.compile(r'^[A-Z]{4}$') + self.re_7b1365b7 = re.compile(r'^(AG|AN|AY|BG|BI|BK|C|DA|DB|DF|DG|DI|DN|DR|DT|DX|EB|ED|EE|EF|EG|EH|EI|EK|EL|EN|EP|ES|ET|EV|EY|FA|FB|FC|FD|FE|FG|FH|FI|FJ|FK|FL|FM|FN|FO|FP|FQ|FS|FT|FV|FW|FX|FY|FZ|GA|GB|GC|GE|GF|GG|GL|GM|GO|GQ|GS|GU|GV|HA|HB|HC|HD|HE|HH|HK|HL|HR|HS|HT|HU|K|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|LO|LP|LQ|LR|LS|LT|LU|LV|LW|LX|LY|LZ|MB|MD|MG|MH|MK|MM|MN|MP|MR|MS|MT|MU|MW|MY|MZ|NC|NF|NG|NI|NL|NS|NT|NV|NW|NZ|OA|OB|OE|OI|OJ|OK|OL|OM|OO|OP|OR|OS|OT|OY|PA|PB|PC|PF|PG|PH|PJ|PK|PL|PM|PO|PP|PT|PW|RC|RJ|RK|RO|RP|SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SP|SS|SU|SV|SW|SY|TA|TB|TD|TF|TG|TI|TJ|TK|TL|TN|TQ|TR|TT|TU|TV|TX|U|UA|UB|UC|UD|UG|UK|UM|UT|VA|VC|VD|VE|VG|VH|VI|VL|VM|VN|VO|VQ|VR|VT|VV|VY|WA|WB|WI|WM|WP|WQ|WR|WS|Y|Z|ZK|ZM)') self.re_7f163374 = re.compile(r'^(1|2|3|4|5|6|7|8|9|10|11|12)$') self.re_7f19b94b = re.compile(r'^((((-*[1-9]|[0-9])|-*[1-9][0-9]*)(\.5)?)|-0\.5)(;((((-*[1-9]|[0-9])|-*[1-9][0-9]*)(\.5)?)|-0\.5))*$') @@ -536,6 +540,7 @@ def node(self, data, tags): if match: # group:tr("Unnecessary amount of decimal places") # throwWarning:tr("{0}","{0.tag}") + # fixAdd:concat("ele=",round(tag("ele")*100)/100) # assertMatch:"node ele=-12.6789" # assertNoMatch:"node ele=1.12" # assertNoMatch:"node ele=12" @@ -543,7 +548,10 @@ def node(self, data, tags): # assertMatch:"node ele=12.123" # assertMatch:"node ele=12.1234" # assertNoMatch:"node ele=high" - err.append({'class': 9006021, 'subclass': 185098060, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + err.append({'class': 9006021, 'subclass': 185098060, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + (mapcss.concat(u'ele=', mapcss.round_(mapcss.tag(tags, u'ele')*100)/100)).split('=', 1)]) + }}) # node[fire_hydrant:pressure="#"] if (u'fire_hydrant:pressure' in keys): @@ -567,6 +575,57 @@ def node(self, data, tags): # throwWarning:tr("unusual value of {0}","{0.key}") err.append({'class': 9006010, 'subclass': 549662812, 'text': mapcss.tr(u'unusual value of {0}', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # *[aeroway=helipad][iata][iata!~/^[A-Z]{3}$/] + # *[aeroway=aerodrome][iata][iata!~/^[A-Z]{3}$/] + if (u'aeroway' in keys and u'iata' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'helipad') and mapcss._tag_capture(capture_tags, 1, tags, u'iata') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_6aa93c30, u'^[A-Z]{3}$'), mapcss._tag_capture(capture_tags, 2, tags, u'iata'))) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'aerodrome') and mapcss._tag_capture(capture_tags, 1, tags, u'iata') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_6aa93c30, u'^[A-Z]{3}$'), mapcss._tag_capture(capture_tags, 2, tags, u'iata'))) + except mapcss.RuleAbort: pass + if match: + # group:tr("Airport tagging") + # throwWarning:tr("wrong value: {0}","{1.tag}") + err.append({'class': 9006022, 'subclass': 206938530, 'text': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + + # *[aeroway=helipad][icao][icao!~/^[A-Z]{4}$/] + # *[aeroway=aerodrome][icao][icao!~/^[A-Z]{4}$/] + if (u'aeroway' in keys and u'icao' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'helipad') and mapcss._tag_capture(capture_tags, 1, tags, u'icao') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_7afc6883, u'^[A-Z]{4}$'), mapcss._tag_capture(capture_tags, 2, tags, u'icao'))) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'aerodrome') and mapcss._tag_capture(capture_tags, 1, tags, u'icao') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_7afc6883, u'^[A-Z]{4}$'), mapcss._tag_capture(capture_tags, 2, tags, u'icao'))) + except mapcss.RuleAbort: pass + if match: + # group:tr("Airport tagging") + # throwWarning:tr("wrong value: {0}","{1.tag}") + err.append({'class': 9006022, 'subclass': 311618853, 'text': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + + # *[aeroway=helipad][icao][icao!~/^(AG|AN|AY|BG|BI|BK|C|DA|DB|DF|DG|DI|DN|DR|DT|DX|EB|ED|EE|EF|EG|EH|EI|EK|EL|EN|EP|ES|ET|EV|EY|FA|FB|FC|FD|FE|FG|FH|FI|FJ|FK|FL|FM|FN|FO|FP|FQ|FS|FT|FV|FW|FX|FY|FZ|GA|GB|GC|GE|GF|GG|GL|GM|GO|GQ|GS|GU|GV|HA|HB|HC|HD|HE|HH|HK|HL|HR|HS|HT|HU|K|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|LO|LP|LQ|LR|LS|LT|LU|LV|LW|LX|LY|LZ|MB|MD|MG|MH|MK|MM|MN|MP|MR|MS|MT|MU|MW|MY|MZ|NC|NF|NG|NI|NL|NS|NT|NV|NW|NZ|OA|OB|OE|OI|OJ|OK|OL|OM|OO|OP|OR|OS|OT|OY|PA|PB|PC|PF|PG|PH|PJ|PK|PL|PM|PO|PP|PT|PW|RC|RJ|RK|RO|RP|SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SP|SS|SU|SV|SW|SY|TA|TB|TD|TF|TG|TI|TJ|TK|TL|TN|TQ|TR|TT|TU|TV|TX|U|UA|UB|UC|UD|UG|UK|UM|UT|VA|VC|VD|VE|VG|VH|VI|VL|VM|VN|VO|VQ|VR|VT|VV|VY|WA|WB|WI|WM|WP|WQ|WR|WS|Y|Z|ZK|ZM)/] + # *[aeroway=aerodrome][icao][icao!~/^(AG|AN|AY|BG|BI|BK|C|DA|DB|DF|DG|DI|DN|DR|DT|DX|EB|ED|EE|EF|EG|EH|EI|EK|EL|EN|EP|ES|ET|EV|EY|FA|FB|FC|FD|FE|FG|FH|FI|FJ|FK|FL|FM|FN|FO|FP|FQ|FS|FT|FV|FW|FX|FY|FZ|GA|GB|GC|GE|GF|GG|GL|GM|GO|GQ|GS|GU|GV|HA|HB|HC|HD|HE|HH|HK|HL|HR|HS|HT|HU|K|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|LO|LP|LQ|LR|LS|LT|LU|LV|LW|LX|LY|LZ|MB|MD|MG|MH|MK|MM|MN|MP|MR|MS|MT|MU|MW|MY|MZ|NC|NF|NG|NI|NL|NS|NT|NV|NW|NZ|OA|OB|OE|OI|OJ|OK|OL|OM|OO|OP|OR|OS|OT|OY|PA|PB|PC|PF|PG|PH|PJ|PK|PL|PM|PO|PP|PT|PW|RC|RJ|RK|RO|RP|SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SP|SS|SU|SV|SW|SY|TA|TB|TD|TF|TG|TI|TJ|TK|TL|TN|TQ|TR|TT|TU|TV|TX|U|UA|UB|UC|UD|UG|UK|UM|UT|VA|VC|VD|VE|VG|VH|VI|VL|VM|VN|VO|VQ|VR|VT|VV|VY|WA|WB|WI|WM|WP|WQ|WR|WS|Y|Z|ZK|ZM)/] + if (u'aeroway' in keys and u'icao' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'helipad') and mapcss._tag_capture(capture_tags, 1, tags, u'icao') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_7b1365b7, u'^(AG|AN|AY|BG|BI|BK|C|DA|DB|DF|DG|DI|DN|DR|DT|DX|EB|ED|EE|EF|EG|EH|EI|EK|EL|EN|EP|ES|ET|EV|EY|FA|FB|FC|FD|FE|FG|FH|FI|FJ|FK|FL|FM|FN|FO|FP|FQ|FS|FT|FV|FW|FX|FY|FZ|GA|GB|GC|GE|GF|GG|GL|GM|GO|GQ|GS|GU|GV|HA|HB|HC|HD|HE|HH|HK|HL|HR|HS|HT|HU|K|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|LO|LP|LQ|LR|LS|LT|LU|LV|LW|LX|LY|LZ|MB|MD|MG|MH|MK|MM|MN|MP|MR|MS|MT|MU|MW|MY|MZ|NC|NF|NG|NI|NL|NS|NT|NV|NW|NZ|OA|OB|OE|OI|OJ|OK|OL|OM|OO|OP|OR|OS|OT|OY|PA|PB|PC|PF|PG|PH|PJ|PK|PL|PM|PO|PP|PT|PW|RC|RJ|RK|RO|RP|SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SP|SS|SU|SV|SW|SY|TA|TB|TD|TF|TG|TI|TJ|TK|TL|TN|TQ|TR|TT|TU|TV|TX|U|UA|UB|UC|UD|UG|UK|UM|UT|VA|VC|VD|VE|VG|VH|VI|VL|VM|VN|VO|VQ|VR|VT|VV|VY|WA|WB|WI|WM|WP|WQ|WR|WS|Y|Z|ZK|ZM)'), mapcss._tag_capture(capture_tags, 2, tags, u'icao'))) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'aerodrome') and mapcss._tag_capture(capture_tags, 1, tags, u'icao') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_7b1365b7, u'^(AG|AN|AY|BG|BI|BK|C|DA|DB|DF|DG|DI|DN|DR|DT|DX|EB|ED|EE|EF|EG|EH|EI|EK|EL|EN|EP|ES|ET|EV|EY|FA|FB|FC|FD|FE|FG|FH|FI|FJ|FK|FL|FM|FN|FO|FP|FQ|FS|FT|FV|FW|FX|FY|FZ|GA|GB|GC|GE|GF|GG|GL|GM|GO|GQ|GS|GU|GV|HA|HB|HC|HD|HE|HH|HK|HL|HR|HS|HT|HU|K|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|LO|LP|LQ|LR|LS|LT|LU|LV|LW|LX|LY|LZ|MB|MD|MG|MH|MK|MM|MN|MP|MR|MS|MT|MU|MW|MY|MZ|NC|NF|NG|NI|NL|NS|NT|NV|NW|NZ|OA|OB|OE|OI|OJ|OK|OL|OM|OO|OP|OR|OS|OT|OY|PA|PB|PC|PF|PG|PH|PJ|PK|PL|PM|PO|PP|PT|PW|RC|RJ|RK|RO|RP|SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SP|SS|SU|SV|SW|SY|TA|TB|TD|TF|TG|TI|TJ|TK|TL|TN|TQ|TR|TT|TU|TV|TX|U|UA|UB|UC|UD|UG|UK|UM|UT|VA|VC|VD|VE|VG|VH|VI|VL|VM|VN|VO|VQ|VR|VT|VV|VY|WA|WB|WI|WM|WP|WQ|WR|WS|Y|Z|ZK|ZM)'), mapcss._tag_capture(capture_tags, 2, tags, u'icao'))) + except mapcss.RuleAbort: pass + if match: + # group:tr("Airport tagging") + # throwWarning:tr("wrong value: {0}","{1.tag}") + err.append({'class': 9006022, 'subclass': 345477776, 'text': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + return err def way(self, data, tags, nds): @@ -1059,7 +1118,11 @@ def way(self, data, tags, nds): if match: # group:tr("Unnecessary amount of decimal places") # throwWarning:tr("{0}","{0.tag}") - err.append({'class': 9006021, 'subclass': 185098060, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # fixAdd:concat("ele=",round(tag("ele")*100)/100) + err.append({'class': 9006021, 'subclass': 185098060, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + (mapcss.concat(u'ele=', mapcss.round_(mapcss.tag(tags, u'ele')*100)/100)).split('=', 1)]) + }}) # *[interval][interval!~/^([0-9][0-9]?|[0-9][0-9]:[0-5][0-9](:[0-9][0-9])?)$/] if (u'interval' in keys): @@ -1080,6 +1143,67 @@ def way(self, data, tags, nds): # assertNoMatch:"way interval=5" err.append({'class': 9006010, 'subclass': 549662812, 'text': mapcss.tr(u'unusual value of {0}', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # *[aeroway=helipad][iata][iata!~/^[A-Z]{3}$/] + # *[aeroway=aerodrome][iata][iata!~/^[A-Z]{3}$/] + if (u'aeroway' in keys and u'iata' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'helipad') and mapcss._tag_capture(capture_tags, 1, tags, u'iata') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_6aa93c30, u'^[A-Z]{3}$'), mapcss._tag_capture(capture_tags, 2, tags, u'iata'))) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'aerodrome') and mapcss._tag_capture(capture_tags, 1, tags, u'iata') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_6aa93c30, u'^[A-Z]{3}$'), mapcss._tag_capture(capture_tags, 2, tags, u'iata'))) + except mapcss.RuleAbort: pass + if match: + # group:tr("Airport tagging") + # throwWarning:tr("wrong value: {0}","{1.tag}") + # assertMatch:"way aeroway=aerodrome iata=BE" + # assertNoMatch:"way aeroway=aerodrome iata=BER" + # assertMatch:"way aeroway=aerodrome iata=BERL" + # assertMatch:"way aeroway=aerodrome iata=ber" + err.append({'class': 9006022, 'subclass': 206938530, 'text': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + + # *[aeroway=helipad][icao][icao!~/^[A-Z]{4}$/] + # *[aeroway=aerodrome][icao][icao!~/^[A-Z]{4}$/] + if (u'aeroway' in keys and u'icao' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'helipad') and mapcss._tag_capture(capture_tags, 1, tags, u'icao') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_7afc6883, u'^[A-Z]{4}$'), mapcss._tag_capture(capture_tags, 2, tags, u'icao'))) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'aerodrome') and mapcss._tag_capture(capture_tags, 1, tags, u'icao') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_7afc6883, u'^[A-Z]{4}$'), mapcss._tag_capture(capture_tags, 2, tags, u'icao'))) + except mapcss.RuleAbort: pass + if match: + # group:tr("Airport tagging") + # throwWarning:tr("wrong value: {0}","{1.tag}") + # assertMatch:"way aeroway=aerodrome icao=EDD" + # assertNoMatch:"way aeroway=aerodrome icao=EDDB" + # assertMatch:"way aeroway=aerodrome icao=EDDBA" + # assertMatch:"way aeroway=aerodrome icao=eddb" + err.append({'class': 9006022, 'subclass': 311618853, 'text': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + + # *[aeroway=helipad][icao][icao!~/^(AG|AN|AY|BG|BI|BK|C|DA|DB|DF|DG|DI|DN|DR|DT|DX|EB|ED|EE|EF|EG|EH|EI|EK|EL|EN|EP|ES|ET|EV|EY|FA|FB|FC|FD|FE|FG|FH|FI|FJ|FK|FL|FM|FN|FO|FP|FQ|FS|FT|FV|FW|FX|FY|FZ|GA|GB|GC|GE|GF|GG|GL|GM|GO|GQ|GS|GU|GV|HA|HB|HC|HD|HE|HH|HK|HL|HR|HS|HT|HU|K|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|LO|LP|LQ|LR|LS|LT|LU|LV|LW|LX|LY|LZ|MB|MD|MG|MH|MK|MM|MN|MP|MR|MS|MT|MU|MW|MY|MZ|NC|NF|NG|NI|NL|NS|NT|NV|NW|NZ|OA|OB|OE|OI|OJ|OK|OL|OM|OO|OP|OR|OS|OT|OY|PA|PB|PC|PF|PG|PH|PJ|PK|PL|PM|PO|PP|PT|PW|RC|RJ|RK|RO|RP|SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SP|SS|SU|SV|SW|SY|TA|TB|TD|TF|TG|TI|TJ|TK|TL|TN|TQ|TR|TT|TU|TV|TX|U|UA|UB|UC|UD|UG|UK|UM|UT|VA|VC|VD|VE|VG|VH|VI|VL|VM|VN|VO|VQ|VR|VT|VV|VY|WA|WB|WI|WM|WP|WQ|WR|WS|Y|Z|ZK|ZM)/] + # *[aeroway=aerodrome][icao][icao!~/^(AG|AN|AY|BG|BI|BK|C|DA|DB|DF|DG|DI|DN|DR|DT|DX|EB|ED|EE|EF|EG|EH|EI|EK|EL|EN|EP|ES|ET|EV|EY|FA|FB|FC|FD|FE|FG|FH|FI|FJ|FK|FL|FM|FN|FO|FP|FQ|FS|FT|FV|FW|FX|FY|FZ|GA|GB|GC|GE|GF|GG|GL|GM|GO|GQ|GS|GU|GV|HA|HB|HC|HD|HE|HH|HK|HL|HR|HS|HT|HU|K|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|LO|LP|LQ|LR|LS|LT|LU|LV|LW|LX|LY|LZ|MB|MD|MG|MH|MK|MM|MN|MP|MR|MS|MT|MU|MW|MY|MZ|NC|NF|NG|NI|NL|NS|NT|NV|NW|NZ|OA|OB|OE|OI|OJ|OK|OL|OM|OO|OP|OR|OS|OT|OY|PA|PB|PC|PF|PG|PH|PJ|PK|PL|PM|PO|PP|PT|PW|RC|RJ|RK|RO|RP|SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SP|SS|SU|SV|SW|SY|TA|TB|TD|TF|TG|TI|TJ|TK|TL|TN|TQ|TR|TT|TU|TV|TX|U|UA|UB|UC|UD|UG|UK|UM|UT|VA|VC|VD|VE|VG|VH|VI|VL|VM|VN|VO|VQ|VR|VT|VV|VY|WA|WB|WI|WM|WP|WQ|WR|WS|Y|Z|ZK|ZM)/] + if (u'aeroway' in keys and u'icao' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'helipad') and mapcss._tag_capture(capture_tags, 1, tags, u'icao') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_7b1365b7, u'^(AG|AN|AY|BG|BI|BK|C|DA|DB|DF|DG|DI|DN|DR|DT|DX|EB|ED|EE|EF|EG|EH|EI|EK|EL|EN|EP|ES|ET|EV|EY|FA|FB|FC|FD|FE|FG|FH|FI|FJ|FK|FL|FM|FN|FO|FP|FQ|FS|FT|FV|FW|FX|FY|FZ|GA|GB|GC|GE|GF|GG|GL|GM|GO|GQ|GS|GU|GV|HA|HB|HC|HD|HE|HH|HK|HL|HR|HS|HT|HU|K|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|LO|LP|LQ|LR|LS|LT|LU|LV|LW|LX|LY|LZ|MB|MD|MG|MH|MK|MM|MN|MP|MR|MS|MT|MU|MW|MY|MZ|NC|NF|NG|NI|NL|NS|NT|NV|NW|NZ|OA|OB|OE|OI|OJ|OK|OL|OM|OO|OP|OR|OS|OT|OY|PA|PB|PC|PF|PG|PH|PJ|PK|PL|PM|PO|PP|PT|PW|RC|RJ|RK|RO|RP|SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SP|SS|SU|SV|SW|SY|TA|TB|TD|TF|TG|TI|TJ|TK|TL|TN|TQ|TR|TT|TU|TV|TX|U|UA|UB|UC|UD|UG|UK|UM|UT|VA|VC|VD|VE|VG|VH|VI|VL|VM|VN|VO|VQ|VR|VT|VV|VY|WA|WB|WI|WM|WP|WQ|WR|WS|Y|Z|ZK|ZM)'), mapcss._tag_capture(capture_tags, 2, tags, u'icao'))) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'aerodrome') and mapcss._tag_capture(capture_tags, 1, tags, u'icao') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_7b1365b7, u'^(AG|AN|AY|BG|BI|BK|C|DA|DB|DF|DG|DI|DN|DR|DT|DX|EB|ED|EE|EF|EG|EH|EI|EK|EL|EN|EP|ES|ET|EV|EY|FA|FB|FC|FD|FE|FG|FH|FI|FJ|FK|FL|FM|FN|FO|FP|FQ|FS|FT|FV|FW|FX|FY|FZ|GA|GB|GC|GE|GF|GG|GL|GM|GO|GQ|GS|GU|GV|HA|HB|HC|HD|HE|HH|HK|HL|HR|HS|HT|HU|K|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|LO|LP|LQ|LR|LS|LT|LU|LV|LW|LX|LY|LZ|MB|MD|MG|MH|MK|MM|MN|MP|MR|MS|MT|MU|MW|MY|MZ|NC|NF|NG|NI|NL|NS|NT|NV|NW|NZ|OA|OB|OE|OI|OJ|OK|OL|OM|OO|OP|OR|OS|OT|OY|PA|PB|PC|PF|PG|PH|PJ|PK|PL|PM|PO|PP|PT|PW|RC|RJ|RK|RO|RP|SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SP|SS|SU|SV|SW|SY|TA|TB|TD|TF|TG|TI|TJ|TK|TL|TN|TQ|TR|TT|TU|TV|TX|U|UA|UB|UC|UD|UG|UK|UM|UT|VA|VC|VD|VE|VG|VH|VI|VL|VM|VN|VO|VQ|VR|VT|VV|VY|WA|WB|WI|WM|WP|WQ|WR|WS|Y|Z|ZK|ZM)'), mapcss._tag_capture(capture_tags, 2, tags, u'icao'))) + except mapcss.RuleAbort: pass + if match: + # group:tr("Airport tagging") + # throwWarning:tr("wrong value: {0}","{1.tag}") + # assertNoMatch:"way aeroway=aerodrome icao=EDDB" + # assertMatch:"way aeroway=aerodrome icao=EQQQ" + err.append({'class': 9006022, 'subclass': 345477776, 'text': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + return err def relation(self, data, tags, members): @@ -1424,7 +1548,11 @@ def relation(self, data, tags, members): if match: # group:tr("Unnecessary amount of decimal places") # throwWarning:tr("{0}","{0.tag}") - err.append({'class': 9006021, 'subclass': 185098060, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}'))}) + # fixAdd:concat("ele=",round(tag("ele")*100)/100) + err.append({'class': 9006021, 'subclass': 185098060, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + '+': dict([ + (mapcss.concat(u'ele=', mapcss.round_(mapcss.tag(tags, u'ele')*100)/100)).split('=', 1)]) + }}) # *[interval][interval!~/^([0-9][0-9]?|[0-9][0-9]:[0-5][0-9](:[0-9][0-9])?)$/] if (u'interval' in keys): @@ -1437,6 +1565,57 @@ def relation(self, data, tags, members): # throwWarning:tr("unusual value of {0}","{0.key}") err.append({'class': 9006010, 'subclass': 549662812, 'text': mapcss.tr(u'unusual value of {0}', mapcss._tag_uncapture(capture_tags, u'{0.key}'))}) + # *[aeroway=helipad][iata][iata!~/^[A-Z]{3}$/] + # *[aeroway=aerodrome][iata][iata!~/^[A-Z]{3}$/] + if (u'aeroway' in keys and u'iata' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'helipad') and mapcss._tag_capture(capture_tags, 1, tags, u'iata') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_6aa93c30, u'^[A-Z]{3}$'), mapcss._tag_capture(capture_tags, 2, tags, u'iata'))) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'aerodrome') and mapcss._tag_capture(capture_tags, 1, tags, u'iata') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_6aa93c30, u'^[A-Z]{3}$'), mapcss._tag_capture(capture_tags, 2, tags, u'iata'))) + except mapcss.RuleAbort: pass + if match: + # group:tr("Airport tagging") + # throwWarning:tr("wrong value: {0}","{1.tag}") + err.append({'class': 9006022, 'subclass': 206938530, 'text': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + + # *[aeroway=helipad][icao][icao!~/^[A-Z]{4}$/] + # *[aeroway=aerodrome][icao][icao!~/^[A-Z]{4}$/] + if (u'aeroway' in keys and u'icao' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'helipad') and mapcss._tag_capture(capture_tags, 1, tags, u'icao') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_7afc6883, u'^[A-Z]{4}$'), mapcss._tag_capture(capture_tags, 2, tags, u'icao'))) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'aerodrome') and mapcss._tag_capture(capture_tags, 1, tags, u'icao') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_7afc6883, u'^[A-Z]{4}$'), mapcss._tag_capture(capture_tags, 2, tags, u'icao'))) + except mapcss.RuleAbort: pass + if match: + # group:tr("Airport tagging") + # throwWarning:tr("wrong value: {0}","{1.tag}") + err.append({'class': 9006022, 'subclass': 311618853, 'text': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + + # *[aeroway=helipad][icao][icao!~/^(AG|AN|AY|BG|BI|BK|C|DA|DB|DF|DG|DI|DN|DR|DT|DX|EB|ED|EE|EF|EG|EH|EI|EK|EL|EN|EP|ES|ET|EV|EY|FA|FB|FC|FD|FE|FG|FH|FI|FJ|FK|FL|FM|FN|FO|FP|FQ|FS|FT|FV|FW|FX|FY|FZ|GA|GB|GC|GE|GF|GG|GL|GM|GO|GQ|GS|GU|GV|HA|HB|HC|HD|HE|HH|HK|HL|HR|HS|HT|HU|K|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|LO|LP|LQ|LR|LS|LT|LU|LV|LW|LX|LY|LZ|MB|MD|MG|MH|MK|MM|MN|MP|MR|MS|MT|MU|MW|MY|MZ|NC|NF|NG|NI|NL|NS|NT|NV|NW|NZ|OA|OB|OE|OI|OJ|OK|OL|OM|OO|OP|OR|OS|OT|OY|PA|PB|PC|PF|PG|PH|PJ|PK|PL|PM|PO|PP|PT|PW|RC|RJ|RK|RO|RP|SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SP|SS|SU|SV|SW|SY|TA|TB|TD|TF|TG|TI|TJ|TK|TL|TN|TQ|TR|TT|TU|TV|TX|U|UA|UB|UC|UD|UG|UK|UM|UT|VA|VC|VD|VE|VG|VH|VI|VL|VM|VN|VO|VQ|VR|VT|VV|VY|WA|WB|WI|WM|WP|WQ|WR|WS|Y|Z|ZK|ZM)/] + # *[aeroway=aerodrome][icao][icao!~/^(AG|AN|AY|BG|BI|BK|C|DA|DB|DF|DG|DI|DN|DR|DT|DX|EB|ED|EE|EF|EG|EH|EI|EK|EL|EN|EP|ES|ET|EV|EY|FA|FB|FC|FD|FE|FG|FH|FI|FJ|FK|FL|FM|FN|FO|FP|FQ|FS|FT|FV|FW|FX|FY|FZ|GA|GB|GC|GE|GF|GG|GL|GM|GO|GQ|GS|GU|GV|HA|HB|HC|HD|HE|HH|HK|HL|HR|HS|HT|HU|K|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|LO|LP|LQ|LR|LS|LT|LU|LV|LW|LX|LY|LZ|MB|MD|MG|MH|MK|MM|MN|MP|MR|MS|MT|MU|MW|MY|MZ|NC|NF|NG|NI|NL|NS|NT|NV|NW|NZ|OA|OB|OE|OI|OJ|OK|OL|OM|OO|OP|OR|OS|OT|OY|PA|PB|PC|PF|PG|PH|PJ|PK|PL|PM|PO|PP|PT|PW|RC|RJ|RK|RO|RP|SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SP|SS|SU|SV|SW|SY|TA|TB|TD|TF|TG|TI|TJ|TK|TL|TN|TQ|TR|TT|TU|TV|TX|U|UA|UB|UC|UD|UG|UK|UM|UT|VA|VC|VD|VE|VG|VH|VI|VL|VM|VN|VO|VQ|VR|VT|VV|VY|WA|WB|WI|WM|WP|WQ|WR|WS|Y|Z|ZK|ZM)/] + if (u'aeroway' in keys and u'icao' in keys): + match = False + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'helipad') and mapcss._tag_capture(capture_tags, 1, tags, u'icao') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_7b1365b7, u'^(AG|AN|AY|BG|BI|BK|C|DA|DB|DF|DG|DI|DN|DR|DT|DX|EB|ED|EE|EF|EG|EH|EI|EK|EL|EN|EP|ES|ET|EV|EY|FA|FB|FC|FD|FE|FG|FH|FI|FJ|FK|FL|FM|FN|FO|FP|FQ|FS|FT|FV|FW|FX|FY|FZ|GA|GB|GC|GE|GF|GG|GL|GM|GO|GQ|GS|GU|GV|HA|HB|HC|HD|HE|HH|HK|HL|HR|HS|HT|HU|K|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|LO|LP|LQ|LR|LS|LT|LU|LV|LW|LX|LY|LZ|MB|MD|MG|MH|MK|MM|MN|MP|MR|MS|MT|MU|MW|MY|MZ|NC|NF|NG|NI|NL|NS|NT|NV|NW|NZ|OA|OB|OE|OI|OJ|OK|OL|OM|OO|OP|OR|OS|OT|OY|PA|PB|PC|PF|PG|PH|PJ|PK|PL|PM|PO|PP|PT|PW|RC|RJ|RK|RO|RP|SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SP|SS|SU|SV|SW|SY|TA|TB|TD|TF|TG|TI|TJ|TK|TL|TN|TQ|TR|TT|TU|TV|TX|U|UA|UB|UC|UD|UG|UK|UM|UT|VA|VC|VD|VE|VG|VH|VI|VL|VM|VN|VO|VQ|VR|VT|VV|VY|WA|WB|WI|WM|WP|WQ|WR|WS|Y|Z|ZK|ZM)'), mapcss._tag_capture(capture_tags, 2, tags, u'icao'))) + except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'aeroway') == mapcss._value_capture(capture_tags, 0, u'aerodrome') and mapcss._tag_capture(capture_tags, 1, tags, u'icao') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 2, self.re_7b1365b7, u'^(AG|AN|AY|BG|BI|BK|C|DA|DB|DF|DG|DI|DN|DR|DT|DX|EB|ED|EE|EF|EG|EH|EI|EK|EL|EN|EP|ES|ET|EV|EY|FA|FB|FC|FD|FE|FG|FH|FI|FJ|FK|FL|FM|FN|FO|FP|FQ|FS|FT|FV|FW|FX|FY|FZ|GA|GB|GC|GE|GF|GG|GL|GM|GO|GQ|GS|GU|GV|HA|HB|HC|HD|HE|HH|HK|HL|HR|HS|HT|HU|K|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|LO|LP|LQ|LR|LS|LT|LU|LV|LW|LX|LY|LZ|MB|MD|MG|MH|MK|MM|MN|MP|MR|MS|MT|MU|MW|MY|MZ|NC|NF|NG|NI|NL|NS|NT|NV|NW|NZ|OA|OB|OE|OI|OJ|OK|OL|OM|OO|OP|OR|OS|OT|OY|PA|PB|PC|PF|PG|PH|PJ|PK|PL|PM|PO|PP|PT|PW|RC|RJ|RK|RO|RP|SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SP|SS|SU|SV|SW|SY|TA|TB|TD|TF|TG|TI|TJ|TK|TL|TN|TQ|TR|TT|TU|TV|TX|U|UA|UB|UC|UD|UG|UK|UM|UT|VA|VC|VD|VE|VG|VH|VI|VL|VM|VN|VO|VQ|VR|VT|VV|VY|WA|WB|WI|WM|WP|WQ|WR|WS|Y|Z|ZK|ZM)'), mapcss._tag_capture(capture_tags, 2, tags, u'icao'))) + except mapcss.RuleAbort: pass + if match: + # group:tr("Airport tagging") + # throwWarning:tr("wrong value: {0}","{1.tag}") + err.append({'class': 9006022, 'subclass': 345477776, 'text': mapcss.tr(u'wrong value: {0}', mapcss._tag_uncapture(capture_tags, u'{1.tag}'))}) + return err @@ -1672,3 +1851,13 @@ class father: self.check_err(n.way(data, {u'interval': u'123'}, [0]), expected={'class': 9006010, 'subclass': 549662812}) self.check_not_err(n.way(data, {u'interval': u'20'}, [0]), expected={'class': 9006010, 'subclass': 549662812}) self.check_not_err(n.way(data, {u'interval': u'5'}, [0]), expected={'class': 9006010, 'subclass': 549662812}) + self.check_err(n.way(data, {u'aeroway': u'aerodrome', u'iata': u'BE'}, [0]), expected={'class': 9006022, 'subclass': 206938530}) + self.check_not_err(n.way(data, {u'aeroway': u'aerodrome', u'iata': u'BER'}, [0]), expected={'class': 9006022, 'subclass': 206938530}) + self.check_err(n.way(data, {u'aeroway': u'aerodrome', u'iata': u'BERL'}, [0]), expected={'class': 9006022, 'subclass': 206938530}) + self.check_err(n.way(data, {u'aeroway': u'aerodrome', u'iata': u'ber'}, [0]), expected={'class': 9006022, 'subclass': 206938530}) + self.check_err(n.way(data, {u'aeroway': u'aerodrome', u'icao': u'EDD'}, [0]), expected={'class': 9006022, 'subclass': 311618853}) + self.check_not_err(n.way(data, {u'aeroway': u'aerodrome', u'icao': u'EDDB'}, [0]), expected={'class': 9006022, 'subclass': 311618853}) + self.check_err(n.way(data, {u'aeroway': u'aerodrome', u'icao': u'EDDBA'}, [0]), expected={'class': 9006022, 'subclass': 311618853}) + self.check_err(n.way(data, {u'aeroway': u'aerodrome', u'icao': u'eddb'}, [0]), expected={'class': 9006022, 'subclass': 311618853}) + self.check_not_err(n.way(data, {u'aeroway': u'aerodrome', u'icao': u'EDDB'}, [0]), expected={'class': 9006022, 'subclass': 345477776}) + self.check_err(n.way(data, {u'aeroway': u'aerodrome', u'icao': u'EQQQ'}, [0]), expected={'class': 9006022, 'subclass': 345477776}) diff --git a/plugins/Josm_unnecessary.py b/plugins/Josm_unnecessary.py index 226a4b201..61bfcc041 100644 --- a/plugins/Josm_unnecessary.py +++ b/plugins/Josm_unnecessary.py @@ -36,6 +36,7 @@ def init(self, logger): self.re_480c7ba6 = re.compile(r'^(?i)(building|bangunan)$') self.re_480ecdbb = re.compile(r'^(?i)(école élémentaire)$') self.re_519078ac = re.compile(r'^(?i)(collège)$') + self.re_56dafa68 = re.compile(r'^(?i)(hydrant)$') self.re_577104db = re.compile(r'^(?i)(kiosk)$') self.re_5b729ae4 = re.compile(r'^(?i)(toilets?)$') self.re_644827a8 = re.compile(r'^(?i)(jalan)$') @@ -209,8 +210,9 @@ def node(self, data, tags): # *[name][name=~/^(?i)(collège)$/][amenity=school]["school:FR"="collège"] # *[name][name=~/^(?i)(lycée)$/][amenity=school]["school:FR"="lycée"] # *[name][name=~/^(?i)(Аптека|farmacia|pharmacy|pharmacie)$/][amenity=pharmacy] + # *[name][name=~/^(?i)(hydrant)$/][emergency=fire_hydrant] # *[name][name=~/^(?i)(АГЗС|АЗС)$/][amenity=fuel] - if (u'amenity' in keys and u'name' in keys) or (u'amenity' in keys and u'name' in keys and u'religion' in keys) or (u'amenity' in keys and u'name' in keys and u'school:FR' in keys) or (u'building' in keys and u'name' in keys) or (u'highway' in keys and u'name' in keys) or (u'historic' in keys and u'memorial' in keys and u'name' in keys) or (u'landuse' in keys and u'name' in keys) or (u'leisure' in keys and u'name' in keys) or (u'man_made' in keys and u'name' in keys) or (u'name' in keys and u'shop' in keys) or (u'name' in keys and u'water' in keys): + if (u'amenity' in keys and u'name' in keys) or (u'amenity' in keys and u'name' in keys and u'religion' in keys) or (u'amenity' in keys and u'name' in keys and u'school:FR' in keys) or (u'building' in keys and u'name' in keys) or (u'emergency' in keys and u'name' in keys) or (u'highway' in keys and u'name' in keys) or (u'historic' in keys and u'memorial' in keys and u'name' in keys) or (u'landuse' in keys and u'name' in keys) or (u'leisure' in keys and u'name' in keys) or (u'man_made' in keys and u'name' in keys) or (u'name' in keys and u'shop' in keys) or (u'name' in keys and u'water' in keys): match = False if not match: capture_tags = {} @@ -332,6 +334,10 @@ def node(self, data, tags): capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_0a40c79a), mapcss._tag_capture(capture_tags, 1, tags, u'name')) and mapcss._tag_capture(capture_tags, 2, tags, u'amenity') == mapcss._value_capture(capture_tags, 2, u'pharmacy')) except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_56dafa68), mapcss._tag_capture(capture_tags, 1, tags, u'name')) and mapcss._tag_capture(capture_tags, 2, tags, u'emergency') == mapcss._value_capture(capture_tags, 2, u'fire_hydrant')) + except mapcss.RuleAbort: pass if not match: capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_6d34128b), mapcss._tag_capture(capture_tags, 1, tags, u'name')) and mapcss._tag_capture(capture_tags, 2, tags, u'amenity') == mapcss._value_capture(capture_tags, 2, u'fuel')) @@ -347,7 +353,7 @@ def node(self, data, tags): # assertMatch:"node name=parking amenity=parking" # assertNoMatch:"node name=shop shop=no" # assertMatch:"node name=shop shop=whatever" - err.append({'class': 9010003, 'subclass': 1160398162, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + err.append({'class': 9010003, 'subclass': 14385755, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '-': ([ u'name']) }}) @@ -562,8 +568,9 @@ def way(self, data, tags, nds): # *[name][name=~/^(?i)(collège)$/][amenity=school]["school:FR"="collège"] # *[name][name=~/^(?i)(lycée)$/][amenity=school]["school:FR"="lycée"] # *[name][name=~/^(?i)(Аптека|farmacia|pharmacy|pharmacie)$/][amenity=pharmacy] + # *[name][name=~/^(?i)(hydrant)$/][emergency=fire_hydrant] # *[name][name=~/^(?i)(АГЗС|АЗС)$/][amenity=fuel] - if (u'amenity' in keys and u'name' in keys) or (u'amenity' in keys and u'name' in keys and u'religion' in keys) or (u'amenity' in keys and u'name' in keys and u'school:FR' in keys) or (u'building' in keys and u'name' in keys) or (u'highway' in keys and u'name' in keys) or (u'historic' in keys and u'memorial' in keys and u'name' in keys) or (u'landuse' in keys and u'name' in keys) or (u'leisure' in keys and u'name' in keys) or (u'man_made' in keys and u'name' in keys) or (u'name' in keys and u'shop' in keys) or (u'name' in keys and u'water' in keys): + if (u'amenity' in keys and u'name' in keys) or (u'amenity' in keys and u'name' in keys and u'religion' in keys) or (u'amenity' in keys and u'name' in keys and u'school:FR' in keys) or (u'building' in keys and u'name' in keys) or (u'emergency' in keys and u'name' in keys) or (u'highway' in keys and u'name' in keys) or (u'historic' in keys and u'memorial' in keys and u'name' in keys) or (u'landuse' in keys and u'name' in keys) or (u'leisure' in keys and u'name' in keys) or (u'man_made' in keys and u'name' in keys) or (u'name' in keys and u'shop' in keys) or (u'name' in keys and u'water' in keys): match = False if not match: capture_tags = {} @@ -685,6 +692,10 @@ def way(self, data, tags, nds): capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_0a40c79a), mapcss._tag_capture(capture_tags, 1, tags, u'name')) and mapcss._tag_capture(capture_tags, 2, tags, u'amenity') == mapcss._value_capture(capture_tags, 2, u'pharmacy')) except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_56dafa68), mapcss._tag_capture(capture_tags, 1, tags, u'name')) and mapcss._tag_capture(capture_tags, 2, tags, u'emergency') == mapcss._value_capture(capture_tags, 2, u'fire_hydrant')) + except mapcss.RuleAbort: pass if not match: capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_6d34128b), mapcss._tag_capture(capture_tags, 1, tags, u'name')) and mapcss._tag_capture(capture_tags, 2, tags, u'amenity') == mapcss._value_capture(capture_tags, 2, u'fuel')) @@ -709,7 +720,7 @@ def way(self, data, tags, nds): # assertNoMatch:"way name=parking" # assertNoMatch:"way name=shop leisure=playground" # assertMatch:"way name=silo man_made=silo" - err.append({'class': 9010003, 'subclass': 1160398162, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + err.append({'class': 9010003, 'subclass': 14385755, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '-': ([ u'name']) }}) @@ -883,8 +894,9 @@ def relation(self, data, tags, members): # *[name][name=~/^(?i)(collège)$/][amenity=school]["school:FR"="collège"] # *[name][name=~/^(?i)(lycée)$/][amenity=school]["school:FR"="lycée"] # *[name][name=~/^(?i)(Аптека|farmacia|pharmacy|pharmacie)$/][amenity=pharmacy] + # *[name][name=~/^(?i)(hydrant)$/][emergency=fire_hydrant] # *[name][name=~/^(?i)(АГЗС|АЗС)$/][amenity=fuel] - if (u'amenity' in keys and u'name' in keys) or (u'amenity' in keys and u'name' in keys and u'religion' in keys) or (u'amenity' in keys and u'name' in keys and u'school:FR' in keys) or (u'building' in keys and u'name' in keys) or (u'highway' in keys and u'name' in keys) or (u'historic' in keys and u'memorial' in keys and u'name' in keys) or (u'landuse' in keys and u'name' in keys) or (u'leisure' in keys and u'name' in keys) or (u'man_made' in keys and u'name' in keys) or (u'name' in keys and u'shop' in keys) or (u'name' in keys and u'water' in keys): + if (u'amenity' in keys and u'name' in keys) or (u'amenity' in keys and u'name' in keys and u'religion' in keys) or (u'amenity' in keys and u'name' in keys and u'school:FR' in keys) or (u'building' in keys and u'name' in keys) or (u'emergency' in keys and u'name' in keys) or (u'highway' in keys and u'name' in keys) or (u'historic' in keys and u'memorial' in keys and u'name' in keys) or (u'landuse' in keys and u'name' in keys) or (u'leisure' in keys and u'name' in keys) or (u'man_made' in keys and u'name' in keys) or (u'name' in keys and u'shop' in keys) or (u'name' in keys and u'water' in keys): match = False if not match: capture_tags = {} @@ -1006,6 +1018,10 @@ def relation(self, data, tags, members): capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_0a40c79a), mapcss._tag_capture(capture_tags, 1, tags, u'name')) and mapcss._tag_capture(capture_tags, 2, tags, u'amenity') == mapcss._value_capture(capture_tags, 2, u'pharmacy')) except mapcss.RuleAbort: pass + if not match: + capture_tags = {} + try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_56dafa68), mapcss._tag_capture(capture_tags, 1, tags, u'name')) and mapcss._tag_capture(capture_tags, 2, tags, u'emergency') == mapcss._value_capture(capture_tags, 2, u'fire_hydrant')) + except mapcss.RuleAbort: pass if not match: capture_tags = {} try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'name') and mapcss.regexp_test(mapcss._value_capture(capture_tags, 1, self.re_6d34128b), mapcss._tag_capture(capture_tags, 1, tags, u'name')) and mapcss._tag_capture(capture_tags, 2, tags, u'amenity') == mapcss._value_capture(capture_tags, 2, u'fuel')) @@ -1017,7 +1033,7 @@ def relation(self, data, tags, members): # assertMatch:"relation name=PLAYGROUND leisure=playground type=multipolygon" # assertMatch:"relation name=Parking amenity=parking type=multipolygon" # assertMatch:"relation name=parking amenity=parking type=multipolygon" - err.append({'class': 9010003, 'subclass': 1160398162, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { + err.append({'class': 9010003, 'subclass': 14385755, 'text': mapcss.tr(u'{0}', mapcss._tag_uncapture(capture_tags, u'{0.tag}')), 'allow_fix_override': True, 'fix': { '-': ([ u'name']) }}) @@ -1056,13 +1072,13 @@ class father: n.init(None) data = {'id': 0, 'lat': 0, 'lon': 0} - self.check_not_err(n.node(data, {u'amenity': u'parking', u'name': u'Megaparking'}), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.node(data, {u'leisure': u'playground', u'name': u'PLaYGrOUNd'}), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.node(data, {u'amenity': u'parking', u'name': u'Parking'}), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_not_err(n.node(data, {u'amenity': u'parking', u'name': u'Parking_with_suffix'}), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.node(data, {u'amenity': u'parking', u'name': u'parking'}), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_not_err(n.node(data, {u'name': u'shop', u'shop': u'no'}), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.node(data, {u'name': u'shop', u'shop': u'whatever'}), expected={'class': 9010003, 'subclass': 1160398162}) + self.check_not_err(n.node(data, {u'amenity': u'parking', u'name': u'Megaparking'}), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.node(data, {u'leisure': u'playground', u'name': u'PLaYGrOUNd'}), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.node(data, {u'amenity': u'parking', u'name': u'Parking'}), expected={'class': 9010003, 'subclass': 14385755}) + self.check_not_err(n.node(data, {u'amenity': u'parking', u'name': u'Parking_with_suffix'}), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.node(data, {u'amenity': u'parking', u'name': u'parking'}), expected={'class': 9010003, 'subclass': 14385755}) + self.check_not_err(n.node(data, {u'name': u'shop', u'shop': u'no'}), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.node(data, {u'name': u'shop', u'shop': u'whatever'}), expected={'class': 9010003, 'subclass': 14385755}) self.check_err(n.way(data, {u'bridge': u'no'}, [0]), expected={'class': 9010001, 'subclass': 2110229428}) self.check_not_err(n.way(data, {u'access': u'no', u'highway': u'motorway', u'motor_vehicle': u'yes'}, [0]), expected={'class': 9010001, 'subclass': 2110229428}) self.check_err(n.way(data, {u'highway': u'motorway', u'motor_vehicle': u'yes'}, [0]), expected={'class': 9010001, 'subclass': 2110229428}) @@ -1072,28 +1088,28 @@ class father: self.check_err(n.way(data, {u'foot': u'designated', u'highway': u'pedestrian'}, [0]), expected={'class': 9010001, 'subclass': 92001477}) self.check_not_err(n.way(data, {u'emergency': u'designated'}, [0]), expected={'class': 9010002, 'subclass': 325672362}) self.check_err(n.way(data, {u'emergency': u'permissive'}, [0]), expected={'class': 9010002, 'subclass': 325672362}) - self.check_err(n.way(data, {u'amenity': u'grave_yard', u'name': u'Cmentarz'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.way(data, {u'building': u'house', u'name': u'Rumah'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_not_err(n.way(data, {u'building': u'yes', u'name': u'Rumah'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.way(data, {u'building': u'silo', u'name': u'Silo'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.way(data, {u'building': u'silo', u'man_made': u'silo', u'name': u'Silo'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.way(data, {u'building': u'house', u'name': u'building'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.way(data, {u'building': u'yes', u'name': u'building'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.way(data, {u'amenity': u'grave_yard', u'name': u'cemetery'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.way(data, {u'building': u'house', u'name': u'house'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_not_err(n.way(data, {u'building': u'yes', u'name': u'house'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_not_err(n.way(data, {u'amenity': u'grave_yard', u'name': u'kiosk'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.way(data, {u'building': u'yes', u'name': u'kiosk', u'shop': u'kiosk'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_not_err(n.way(data, {u'building': u'yes', u'name': u'kiosk'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_not_err(n.way(data, {u'name': u'parking'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_not_err(n.way(data, {u'leisure': u'playground', u'name': u'shop'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.way(data, {u'man_made': u'silo', u'name': u'silo'}, [0]), expected={'class': 9010003, 'subclass': 1160398162}) + self.check_err(n.way(data, {u'amenity': u'grave_yard', u'name': u'Cmentarz'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.way(data, {u'building': u'house', u'name': u'Rumah'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_not_err(n.way(data, {u'building': u'yes', u'name': u'Rumah'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.way(data, {u'building': u'silo', u'name': u'Silo'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.way(data, {u'building': u'silo', u'man_made': u'silo', u'name': u'Silo'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.way(data, {u'building': u'house', u'name': u'building'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.way(data, {u'building': u'yes', u'name': u'building'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.way(data, {u'amenity': u'grave_yard', u'name': u'cemetery'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.way(data, {u'building': u'house', u'name': u'house'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_not_err(n.way(data, {u'building': u'yes', u'name': u'house'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_not_err(n.way(data, {u'amenity': u'grave_yard', u'name': u'kiosk'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.way(data, {u'building': u'yes', u'name': u'kiosk', u'shop': u'kiosk'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_not_err(n.way(data, {u'building': u'yes', u'name': u'kiosk'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_not_err(n.way(data, {u'name': u'parking'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_not_err(n.way(data, {u'leisure': u'playground', u'name': u'shop'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.way(data, {u'man_made': u'silo', u'name': u'silo'}, [0]), expected={'class': 9010003, 'subclass': 14385755}) self.check_not_err(n.way(data, {u'building': u'house', u'name': u'Rumah'}, [0]), expected={'class': 9010003, 'subclass': 1173941116}) self.check_err(n.way(data, {u'building': u'yes', u'name': u'Rumah'}, [0]), expected={'class': 9010003, 'subclass': 1173941116}) self.check_not_err(n.way(data, {u'building': u'house', u'name': u'building'}, [0]), expected={'class': 9010003, 'subclass': 1173941116}) self.check_not_err(n.way(data, {u'building': u'yes', u'name': u'building'}, [0]), expected={'class': 9010003, 'subclass': 1173941116}) self.check_not_err(n.way(data, {u'building': u'house', u'name': u'house'}, [0]), expected={'class': 9010003, 'subclass': 1173941116}) self.check_err(n.way(data, {u'building': u'yes', u'name': u'house'}, [0]), expected={'class': 9010003, 'subclass': 1173941116}) - self.check_err(n.relation(data, {u'leisure': u'playground', u'name': u'PLAYGROUND', u'type': u'multipolygon'}, []), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.relation(data, {u'amenity': u'parking', u'name': u'Parking', u'type': u'multipolygon'}, []), expected={'class': 9010003, 'subclass': 1160398162}) - self.check_err(n.relation(data, {u'amenity': u'parking', u'name': u'parking', u'type': u'multipolygon'}, []), expected={'class': 9010003, 'subclass': 1160398162}) + self.check_err(n.relation(data, {u'leisure': u'playground', u'name': u'PLAYGROUND', u'type': u'multipolygon'}, []), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.relation(data, {u'amenity': u'parking', u'name': u'Parking', u'type': u'multipolygon'}, []), expected={'class': 9010003, 'subclass': 14385755}) + self.check_err(n.relation(data, {u'amenity': u'parking', u'name': u'parking', u'type': u'multipolygon'}, []), expected={'class': 9010003, 'subclass': 14385755})