-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLuxembourg-Specific-Rules.validator.mapcss
79 lines (62 loc) · 3.39 KB
/
Luxembourg-Specific-Rules.validator.mapcss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
meta {
title: "Luxembourg specific rules";
version: "0.5";
description: "Rules, which are limited to Luxembourg only.";
author: "David Morais Ferreira (dmlu), Guillaume Rischard (Stereo)";
icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAHgAgMAAAAgaeFmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEXtKTn///8Aod61Cg5KAAAAAWJLR0QB/wIt3gAAAAd0SU1FB+EICgIGODPdAlQAAAE2SURBVHja7c8BDQAACAOgl7SkKc3hBw1IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJ6YEiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIv2RLSEiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIlIfOXgBikX7OtctAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA4LTEwVDAyOjA2OjU1KzAwOjAw5j1ThgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wOC0xMFQwMjowNjo1NSswMDowMJdg6zoAAAAASUVORK5CYII=";
link: "https://github.com/DavidMoraisFerreira/josm-validator-luxembourg";
watch-modified: true;
min-josm-version: "11424"; /* due to territory selectors */
baselanguage: "en";
}
meta[lang=de] {
title: "Luxemburgspezifische Regeln";
description: "Regeln, welche nur auf Luxemburg beschränkt sind.";
}
meta[lang=fr] {
title: "Règles pour le Luxembourg";
description: "Règles de validation spécifiques au Luxembourg.";
}
/* Address Convention: https://wiki.openstreetmap.org/wiki/WikiProject_Luxembourg/Addresses */
*[/^addr:/][!addr:city][inside("LU")] {
throwWarning: tr("addr:city missing!");
}
*[/^addr:/][!addr:country][inside("LU")] {
throwWarning: tr("addr:country missing!");
fixAdd: concat("addr:country=", "LU");
}
*[/^addr:/][addr:country]["addr:country"!="LU"][inside("LU")] {
throwError: tr("Invalid addr:country! Value differs from \"LU\"");
fixAdd: concat("addr:country=", "LU");
}
*[/^addr:/][!addr:housenumber][inside("LU")] {
throwWarning: tr("addr:housenumber missing!");
}
*[/^addr:/][addr:housenumber][addr:housenumber!~/^[1-9][0-9]{0,2}[A-Z]{0,3}([-]*[1-9][0-9]{0,2}[A-Z]{0,3}){0,20}$/][inside("LU")] {
throwError: tr("Invalid addr:housenumber! Valid examples: \"55\", \"55A\" or \"55-57\"");
}
*[/^addr:/][!addr:postcode][inside("LU")] {
throwWarning: tr("addr:postcode missing!");
}
*[/^addr:/][addr:postcode][addr:postcode!~/\d{4}/][inside("LU")] {
throwError: tr("Invalid addr:postcode! Expected 4 digits");
}
*[/^addr:/][ref:caclr][ref:caclr!~/^(\d{1,6}|missing|wrong)$/][inside("LU")] {
throwError: tr("Invalid ref:caclr! Expected between 1 and 6 digits or \"wrong\" or \"missing\"");
}
/* Street Convention: https://wiki.openstreetmap.org/wiki/WikiProject_Luxembourg/Roads */
way[ref=~/^A.*/][highway!~/motorway|motorway_link/][inside("LU")] {
throwError: tr("\"Autoroutes\" (A) tagging doesn't follow convention");
suggestAlternative: "highway=motorway";
suggestAlternative: "highway=motorway_link";
}
way[ref=~/^N.*/][highway!=primary][inside("LU")] {
throwError: tr("\"Routes nationales\" (N) tagging doesn't follow convention");
suggestAlternative: "highway=primary";
fixAdd: concat("highway=", "primary");
}
way[ref=~/^CR.*/][highway!=secondary][inside("LU")] {
throwError: tr("\"Chemin repris\" (CR) tagging doesn't follow convention");
suggestAlternative: "highway=secondary";
fixAdd: concat("highway=", "secondary");
}