-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rules_Marcmarc.error.validator.mapcss
80 lines (75 loc) · 2.66 KB
/
Rules_Marcmarc.error.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
80
meta {
title: "Extended validator rules";
version: "1.07_2023-06-07";
description: "try to catch 'all' fixables errors and improvement";
author: "Marcmarc";
link: "https://github.com/Marc-marc-marc/osm-mapcss";
min-josm-version: "14481";
baselanguage: "en";
-osmoseTags: list("fix:chair");
}
meta[lang=fr] {
title: "Règles de validations étendues";
description: "essaye de traiter "toutes" les erreurs corrigibles et les améliorations";
}
relation[operator="TPF Auto"][!"operator:wikidata"][inside("CH")] {
throwWarning: tr("{0} is the old name", "{0.tag}");
suggestAlternative: "operator=TPF";
fixAdd: "operator=TPF";
fixAdd: "operator:wikidata=Q609332";
}
relation[operator="TPF Auto"]["operator:wikidata"=Q609332][inside("CH")] {
throwWarning: tr("{0} is the old name", "{0.tag}");
suggestAlternative: "operator=TPF";
fixAdd: "operator=TPF";
}
relation[network=frimobil][!"network:wikidata"][inside("CH")] {
throwWarning: tr("{0} wrong caps", "{0.tag}");
suggestAlternative: "network=Frimobil";
fixAdd: "network=Frimobil";
fixAdd: "network:wikidata=Q2394200";
}
relation[network=frimobil]["network:wikidata"=Q2394200][inside("CH")] {
throwWarning: tr("{0} wrong caps", "{0.tag}");
suggestAlternative: "network=Frimobil";
fixAdd: "network=Frimobil";
}
*["addr:housenumber"=~/.*-.*/] {
throwError: tr("no - in addr:housenumber");
}
*[source=survey] {
throwWarning: tr("{0} is of limited use", "{0.tag}");
suggestAlternative: "survey:date or changeset tag";
fixAdd: "surveyed=yes";
fixRemove: "source";
}
*[crossing_ref=island]["crossing:island"=yes] {
throwWarning: tr("wrong usage of {0}", "{0.value}");
suggestAlternative: "crossing:island=yes";
fixRemove: "crossing_ref";
}
*[crossing_ref=island][!"crossing:island"] {
throwWarning: tr("wrong usage of {0}", "{0.value}");
suggestAlternative: "crossing:island=yes";
fixAdd: "crossing:island=yes";
fixRemove: "crossing_ref";
}
*[crossing_ref=island]["crossing:island"]["crossing:island"!=yes] {
throwWarning: tr("conflit {0}", "{0.value}");
suggestAlternative: "crossing:island=yes";
}
*["crossing:island"=island] {
throwWarning: tr("wrong usage of {0}", "{0.value}");
suggestAlternative: "crossing:island=yes";
fixAdd: "crossing:island=yes";
}
*["roof:colour"=light_gray] {
throwWarning: tr("invalid color {0}", "{0.value}");
suggestAlternative: "no underscore";
fixAdd: "{0.key}=lightgray";
}
relation[type=associatedstreet] {
throwWarning: tr("missing caps for the S in {0}", "{0.value}");
suggestAlternative: "type=associatedStreet";
fixAdd: "type=associatedStreet"
}