Ticket #17607: 17607.patch

File 17607.patch, 3.1 KB (added by reichg, 5 years ago)

This patch addresses construction tags.

  • resources/data/validator/combinations.mapcss

     
    738738  fixAdd: "emergency=emergency_ward_entrance";
    739739}
    740740
     741/* missing or conflicting construction, see #17607 */
     742/* {0.key} without {1.key} and {2.key} */
     743*[construction:building][!building][!construction],
     744*[construction:highway][!highway][!construction],
     745*[construction:railway][!railway][!construction],
     746*[construction:landuse][!landuse][!construction] {
     747  throwWarning: tr("{0} without {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
     748  group: tr("missing tag");
     749  fixAdd: "{1.key}=construction";
     750  fixAdd: "construction={0.value}";
     751  assertMatch:   "way construction:building=house";
     752  assertNoMatch: "way construction:building=house building=house ";
     753  assertNoMatch: "way construction:building=house construction=house";
     754}
     755/* {0.key} and {1.key} without {2.key} */
     756*[building=construction]["construction:building"][!construction],
     757*[highway=construction]["construction:highway"][!construction],
     758*[railway=construction]["construction:railway"][!construction],
     759*[landuse=construction]["construction:landuse"][!construction] {
     760  throwWarning:  tr("{0} together with {1} but without {2}", "{0.key}", "{1.key}", "{2.key}");
     761  group: tr("missing tag");
     762  fixAdd: "construction={1.value}";
     763  assertMatch:   "way construction:building=house building=construction";
     764  assertNoMatch: "way construction:building=house building=house ";
     765  assertNoMatch: "way construction:building=house construction=house";
     766}
     767/* {0.key} and {1.key} without {2.key} */
     768*[building]["construction:building"][!construction][building!=construction],
     769*[highway]["construction:highway"][!construction][highway!=construction],
     770*[railway]["construction:railway"][!construction][railway!=construction],
     771*[landuse]["construction:landuse"][!construction][landuse!=construction] {
     772  throwWarning: tr("{0} together with {1} and conflicting values plus no {2}", "{0.key}", "{1.key}", "{2.key}");
     773  group: tr("suspicious tag combination");
     774  assertMatch:   "way construction:building=house building=office";
     775  assertNoMatch: "way construction:building=house building=construction";
     776  assertNoMatch: "way construction:building=house construction=house";
     777}
     778
     779*["construction:building"][construction][construction:building != *construction],
     780*["construction:highway"][construction][construction:highway != *construction],
     781*["construction:railway"][construction][construction:railway != *construction],
     782*["construction:landuse"][construction][construction:landuse != *construction] {
     783  throwWarning: tr("{0} together with {1} and conflicting values", "{0.key}", "{1.key}");
     784  group: tr("suspicious tag combination");
     785  assertMatch:   "way construction:building=house construction=office";
     786  assertNoMatch: "way construction:building=house construction=house";
     787}
     788
    741789/* #18203 */
    742790way[construction][construction!=yes][construction!=minor][highway][highway!=construction] {
    743791  throwWarning: tr("{0} together with {1}", "{3.tag}", "{0.tag}");