source: josm/trunk/data/validator/addresses.mapcss@ 15392

Last change on this file since 15392 was 15144, checked in by Klumbumbus, 5 years ago

see #17486 - don't warn about addr:housenumber=bb in Bosnia and Herzegovina

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1/* #10232 */
2way[addr:interpolation=odd] > node[addr:housenumber][get(split(".", tag("addr:housenumber")/2), 1)=0] {
3 throwWarning: tr("Even housenumber in odd address interpolation.");
4}
5way[addr:interpolation=even] > node[addr:housenumber][get(split(".", tag("addr:housenumber")/2), 1)=5] {
6 throwWarning: tr("Odd housenumber in even address interpolation.");
7}
8way[addr:interpolation] {
9 throwOther: tr("Way with {0}. Tag each housenumber separately if possible.", "{0.key}");
10}
11
12/* #13752 */
13*[!addr:housenumber][addr:street][addr:housename=~/^[0-9]+[a-zA-Z]?$/] {
14 throwOther: tr("Object has no {0}, however, it has {1} and {2} whose value looks like a housenumber.", "{0.key}", "{1.key}", "{2.key}");
15 assertMatch: "node addr:street=foo addr:housename=1";
16 assertMatch: "node addr:street=foo addr:housename=1a";
17 assertMatch: "node addr:street=foo addr:housename=221B";
18 assertNoMatch: "node addr:street=foo addr:housename=1 addr:housenumber=1";
19 assertNoMatch: "node addr:housename=1";
20 assertNoMatch: "node addr:street=foo addr:housename=bar";
21}
22*[addr:housenumber][addr:housename]["addr:housenumber"=*"addr:housename"] {
23 throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
24 assertMatch: "node addr:housename=1 addr:housenumber=1";
25 assertNoMatch: "node addr:housename=1 addr:housenumber=2";
26}
27
28/* #17486 */
29*[addr:housenumber=bb][inside("BA")] {
30 set ok_housenumber;
31}
32*[addr:housenumber][addr:housenumber!~/[0-9]/]!.ok_housenumber {
33 throwWarning: tr("{0} without number", "{0.key}");
34 assertNoMatch: "way addr:housenumber=0";
35 assertNoMatch: "way addr:housenumber=5a";
36 assertNoMatch: "way addr:housenumber=5/1";
37 assertMatch: "way addr:housenumber=?";
38 assertMatch: "way addr:housenumber=unknown";
39 assertMatch: "way addr:housenumber=Palace of Westminster";
40 assertMatch: "way addr:housenumber=S/N";
41}
Note: See TracBrowser for help on using the repository browser.