File: addresses.mapcss

package info (click to toggle)
josm 0.0.svn14760%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 187,192 kB
  • sloc: java: 317,260; xml: 197,001; perl: 10,125; jsp: 250; sh: 112; makefile: 94; python: 29
file content (26 lines) | stat: -rw-r--r-- 1,358 bytes parent folder | download | duplicates (3)
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
/* #10232 */
way[addr:interpolation=odd] > node[addr:housenumber][get(split(".", tag("addr:housenumber")/2), 1)=0] {
    throwWarning: tr("Even housenumber in odd address interpolation.");
}
way[addr:interpolation=even] > node[addr:housenumber][get(split(".", tag("addr:housenumber")/2), 1)=5] {
    throwWarning: tr("Odd housenumber in even address interpolation.");
}
way[addr:interpolation] {
    throwOther: tr("Way with {0}. Tag each housenumber separately if possible.", "{0.key}");
}

/* #13752 */
*[!addr:housenumber][addr:street][addr:housename=~/^[0-9]+[a-zA-Z]?$/] {
    throwOther: tr("Object has no {0}, however, it has {1} and {2} whose value looks like a housenumber.", "{0.key}", "{1.key}", "{2.key}");
    assertMatch: "node addr:street=foo addr:housename=1";
    assertMatch: "node addr:street=foo addr:housename=1a";
    assertMatch: "node addr:street=foo addr:housename=221B";
    assertNoMatch: "node addr:street=foo addr:housename=1 addr:housenumber=1";
    assertNoMatch: "node addr:housename=1";
    assertNoMatch: "node addr:street=foo addr:housename=bar";
}
*[addr:housenumber][addr:housename]["addr:housenumber"=*"addr:housename"] {
    throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
    assertMatch: "node addr:housename=1 addr:housenumber=1";
    assertNoMatch: "node addr:housename=1 addr:housenumber=2";
}