1 | /* #10232 */
|
---|
2 | way[addr:interpolation=odd] > node[addr:housenumber][get(split(".", tag("addr:housenumber")/2), 1)=0] {
|
---|
3 | throwWarning: tr("Even housenumber in odd address interpolation.");
|
---|
4 | }
|
---|
5 | way[addr:interpolation=even] > node[addr:housenumber][get(split(".", tag("addr:housenumber")/2), 1)=5] {
|
---|
6 | throwWarning: tr("Odd housenumber in even address interpolation.");
|
---|
7 | }
|
---|
8 | way[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][addr:housenumber!~/[0-9]/] {
|
---|
30 | throwWarning: tr("{0} without number", "{0.key}");
|
---|
31 | assertNoMatch: "way addr:housenumber=0";
|
---|
32 | assertNoMatch: "way addr:housenumber=5a";
|
---|
33 | assertNoMatch: "way addr:housenumber=5/1";
|
---|
34 | assertMatch: "way addr:housenumber=?";
|
---|
35 | assertMatch: "way addr:housenumber=unknown";
|
---|
36 | assertMatch: "way addr:housenumber=Palace of Westminster";
|
---|
37 | assertMatch: "way addr:housenumber=S/N";
|
---|
38 | }
|
---|