Skip to content

Commit 53463c4

Browse files
Famlamfrodrigo
authored andcommitted
Update external mapcss files
1 parent fa8a1be commit 53463c4

37 files changed

+218
-32
lines changed

mapcss/item_map.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@
2929
'NL-UT',
3030
'NL-NH'],
3131
'prefix': 'Josm_',
32-
'subclass_blacklist': [1560886491],
32+
'subclass_blacklist': [1560886491, 1411893821],
3333
'url': 'https://raw.githubusercontent.com/Famlam/OsmMapcssValidationNL/main/netherlands.validator.mapcss',
3434
'url_display': 'https://github.com/Famlam/OsmMapcssValidationNL/blob/main/netherlands.validator.mapcss'},
3535
'FranceSpecificRules': {'class': {None: 9019007,
3636
"Unusual ref for motorway_junction; use of 'ref=*' for the exit destination ref?": 9019004,
3737
'missing tag': 9019003,
3838
'validation rules highway milestone': 9019001,
39-
'validation rules nat_ref in France': 9019002},
39+
'validation rules nat_ref in France': 9019002,
40+
'{0} is not a valid code NAF/APE value': 9019008},
4041
'item': 9019,
4142
'only_for': ['FR'],
4243
'prefix': 'Josm_',

plugins/Bicycle.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88

99
class Bicycle(PluginMapCSS):
10+
# ------------------------------- IMPORTANT -------------------------------
11+
# This file is generated automatically and should not be modified directly.
12+
# Instead, modify the source mapcss file and regenerate this Python script.
13+
# -------------------------------------------------------------------------
1014

1115

1216

plugins/Colour.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88

99
class Colour(PluginMapCSS):
10+
# ------------------------------- IMPORTANT -------------------------------
11+
# This file is generated automatically and should not be modified directly.
12+
# Instead, modify the source mapcss file and regenerate this Python script.
13+
# -------------------------------------------------------------------------
1014

1115

1216

plugins/Construction2.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88

99
class Construction2(PluginMapCSS):
10+
# ------------------------------- IMPORTANT -------------------------------
11+
# This file is generated automatically and should not be modified directly.
12+
# Instead, modify the source mapcss file and regenerate this Python script.
13+
# -------------------------------------------------------------------------
1014

1115

1216

plugins/Covid19.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88

99
class Covid19(PluginMapCSS):
10+
# ------------------------------- IMPORTANT -------------------------------
11+
# This file is generated automatically and should not be modified directly.
12+
# Instead, modify the source mapcss file and regenerate this Python script.
13+
# -------------------------------------------------------------------------
1014

1115

1216

plugins/Josm_Charge.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88

99
class Josm_Charge(PluginMapCSS):
10+
# ------------------------------- IMPORTANT -------------------------------
11+
# This file is generated automatically and should not be modified directly.
12+
# Instead, modify the source mapcss file and regenerate this Python script.
13+
# -------------------------------------------------------------------------
1014

1115
MAPCSS_URL = 'https://josm.openstreetmap.de/wiki/Rules/ChargeRules'
1216

plugins/Josm_DutchSpecific.py

Lines changed: 40 additions & 30 deletions
Large diffs are not rendered by default.

plugins/Josm_FranceSpecificRules.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88

99
class Josm_FranceSpecificRules(PluginMapCSS):
10+
# ------------------------------- IMPORTANT -------------------------------
11+
# This file is generated automatically and should not be modified directly.
12+
# Instead, modify the source mapcss file and regenerate this Python script.
13+
# -------------------------------------------------------------------------
1014

1115
MAPCSS_URL = 'https://josm.openstreetmap.de/wiki/Rules/FranceSpecificRules'
1216

@@ -36,6 +40,7 @@ def init(self, logger):
3640
self.errors[9019005] = self.def_class(item = 9019, level = 3, tags = mapcss.list_('ref', 'highway'), title = mapcss.tr('validation rules Fantoir in France'))
3741
self.errors[9019006] = self.def_class(item = 9019, level = 3, tags = [], title = mapcss.tr('{0} is not a valid SIREN number', mapcss._tag_uncapture(capture_tags, '{0.tag}')))
3842
self.errors[9019007] = self.def_class(item = 9019, level = 3, tags = [], title = mapcss.tr('{0} is not a valid SIRET number', mapcss._tag_uncapture(capture_tags, '{0.tag}')))
43+
self.errors[9019008] = self.def_class(item = 9019, level = 3, tags = [], title = mapcss.tr('{0} is not a valid code NAF/APE value', mapcss._tag_uncapture(capture_tags, '{0.tag}')))
3944

4045
self.re_045a0f34 = re.compile(r'(?i)co.?voiturage')
4146
self.re_107d2c86 = re.compile(r'PT[1-9]{1}[0-9]*')
@@ -49,6 +54,7 @@ def init(self, logger):
4954
self.re_3b90619c = re.compile(r'^\D')
5055
self.re_4507c4e3 = re.compile(r'^(((((((0[1-9]|1[0-9]|2A|2B|2[1-9]|[3-8][0-9]|9[0-5])([0-9]{3}))|((971(0[1-9]|[1-3][0-9]))|(972(0[1-9]|[1-3][0-9]))|(973(0[1-9]|[1-6][0-9]))|(974(0[1-9]|[1-2][0-9]))|(976(0[1-9]|1[0-7]))))([0-9]|[A-Z])([0-9]{3}))([ABCDEFGHJKLMNPRSTUVWXYZ]|))(|;(((((0[1-9]|1[0-9]|2A|2B|2[1-9]|[3-8][0-9]|9[0-5])([0-9]{3}))|((971(0[1-9]|[1-3][0-9]))|(972(0[1-9]|[1-3][0-9]))|(973(0[1-9]|[1-6][0-9]))|(974(0[1-9]|[1-2][0-9]))|(976(0[1-9]|1[0-7]))))([0-9]|[A-Z])([0-9]{3}))([ABCDEFGHJKLMNPRSTUVWXYZ]|)))+)|no)$')
5156
self.re_4bae79a8 = re.compile(r'[0-9AB]{5}[A-Z]{1,3}[0-9]{4}|[0-9AB]{5}EEM[0-9]{2}')
57+
self.re_57169e32 = re.compile(r'^([0-9]{2}\.[0-9]{2}[A-Z];)*[0-9]{2}\.[0-9]{2}[A-Z]$')
5258
self.re_58d303a6 = re.compile(r'^([0-9]{9};)*[0-9]{9}$')
5359
self.re_5a641603 = re.compile(r'^^(0[1-9]|1[0-9]|2[1-9]|[3-8][0-9]|9[0-5]|973|975|976)[ANP](8|9)[0-9]{3}(|A|N)([0-9]?[0-9])(|[A-Z]|[a-z])(|CD)_(1[0-9]|[1-9])D$')
5460
self.re_60717768 = re.compile(r'^((0[1-9]|1[0-9]|2[1-9]|[3-8][0-9]|9[0-5]|973|975|976)PR([0-9]|[1-9][0-9]|[1-9][0-9][0-9])[DGU](|C))$')
@@ -384,6 +390,17 @@ def node(self, data, tags):
384390
# throwWarning:tr("{0} is not a valid SIRET number","{0.tag}")
385391
err.append({'class': 9019007, 'subclass': 0, 'text': mapcss.tr('{0} is not a valid SIRET number', mapcss._tag_uncapture(capture_tags, '{0.tag}'))})
386392

393+
# *["ref:FR:NAF"]["ref:FR:NAF"!~/^([0-9]{2}\.[0-9]{2}[A-Z];)*[0-9]{2}\.[0-9]{2}[A-Z]$/][inside("FR")]
394+
if ('ref:FR:NAF' in keys):
395+
match = False
396+
if not match:
397+
capture_tags = {}
398+
try: match = ((mapcss._tag_capture(capture_tags, 0, tags, 'ref:FR:NAF')) and (not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_57169e32, '^([0-9]{2}\\.[0-9]{2}[A-Z];)*[0-9]{2}\\.[0-9]{2}[A-Z]$'), mapcss._tag_capture(capture_tags, 1, tags, 'ref:FR:NAF'))) and (mapcss.inside(self.father.config.options, 'FR')))
399+
except mapcss.RuleAbort: pass
400+
if match:
401+
# throwWarning:tr("{0} is not a valid code NAF/APE value","{0.tag}")
402+
err.append({'class': 9019008, 'subclass': 1955725258, 'text': mapcss.tr('{0} is not a valid code NAF/APE value', mapcss._tag_uncapture(capture_tags, '{0.tag}'))})
403+
387404
return err
388405

389406
def way(self, data, tags, nds):
@@ -827,6 +844,17 @@ def way(self, data, tags, nds):
827844
# throwWarning:tr("{0} is not a valid SIRET number","{0.tag}")
828845
err.append({'class': 9019007, 'subclass': 0, 'text': mapcss.tr('{0} is not a valid SIRET number', mapcss._tag_uncapture(capture_tags, '{0.tag}'))})
829846

847+
# *["ref:FR:NAF"]["ref:FR:NAF"!~/^([0-9]{2}\.[0-9]{2}[A-Z];)*[0-9]{2}\.[0-9]{2}[A-Z]$/][inside("FR")]
848+
if ('ref:FR:NAF' in keys):
849+
match = False
850+
if not match:
851+
capture_tags = {}
852+
try: match = ((mapcss._tag_capture(capture_tags, 0, tags, 'ref:FR:NAF')) and (not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_57169e32, '^([0-9]{2}\\.[0-9]{2}[A-Z];)*[0-9]{2}\\.[0-9]{2}[A-Z]$'), mapcss._tag_capture(capture_tags, 1, tags, 'ref:FR:NAF'))) and (mapcss.inside(self.father.config.options, 'FR')))
853+
except mapcss.RuleAbort: pass
854+
if match:
855+
# throwWarning:tr("{0} is not a valid code NAF/APE value","{0.tag}")
856+
err.append({'class': 9019008, 'subclass': 1955725258, 'text': mapcss.tr('{0} is not a valid code NAF/APE value', mapcss._tag_uncapture(capture_tags, '{0.tag}'))})
857+
830858
return err
831859

832860
def relation(self, data, tags, members):
@@ -1092,6 +1120,17 @@ def relation(self, data, tags, members):
10921120
# throwWarning:tr("{0} is not a valid SIRET number","{0.tag}")
10931121
err.append({'class': 9019007, 'subclass': 0, 'text': mapcss.tr('{0} is not a valid SIRET number', mapcss._tag_uncapture(capture_tags, '{0.tag}'))})
10941122

1123+
# *["ref:FR:NAF"]["ref:FR:NAF"!~/^([0-9]{2}\.[0-9]{2}[A-Z];)*[0-9]{2}\.[0-9]{2}[A-Z]$/][inside("FR")]
1124+
if ('ref:FR:NAF' in keys):
1125+
match = False
1126+
if not match:
1127+
capture_tags = {}
1128+
try: match = ((mapcss._tag_capture(capture_tags, 0, tags, 'ref:FR:NAF')) and (not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_57169e32, '^([0-9]{2}\\.[0-9]{2}[A-Z];)*[0-9]{2}\\.[0-9]{2}[A-Z]$'), mapcss._tag_capture(capture_tags, 1, tags, 'ref:FR:NAF'))) and (mapcss.inside(self.father.config.options, 'FR')))
1129+
except mapcss.RuleAbort: pass
1130+
if match:
1131+
# throwWarning:tr("{0} is not a valid code NAF/APE value","{0.tag}")
1132+
err.append({'class': 9019008, 'subclass': 1955725258, 'text': mapcss.tr('{0} is not a valid code NAF/APE value', mapcss._tag_uncapture(capture_tags, '{0.tag}'))})
1133+
10951134
return err
10961135

10971136

plugins/Josm_ItalySpecific.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88

99
class Josm_ItalySpecific(PluginMapCSS):
10+
# ------------------------------- IMPORTANT -------------------------------
11+
# This file is generated automatically and should not be modified directly.
12+
# Instead, modify the source mapcss file and regenerate this Python script.
13+
# -------------------------------------------------------------------------
1014

1115
MAPCSS_URL = 'https://josm.openstreetmap.de/wiki/Rules/ItalySpecific'
1216

plugins/Josm_Rules_Brazilian_Specific.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88

99
class Josm_Rules_Brazilian_Specific(PluginMapCSS):
10+
# ------------------------------- IMPORTANT -------------------------------
11+
# This file is generated automatically and should not be modified directly.
12+
# Instead, modify the source mapcss file and regenerate this Python script.
13+
# -------------------------------------------------------------------------
1014

1115
MAPCSS_URL = 'https://github.com/OSMBrasil/validador-josm/blob/master/Rules_Brazilian-Specific.validator.mapcss'
1216

0 commit comments

Comments
 (0)