Ticket #16898: josm_16898_v4.patch

File josm_16898_v4.patch, 2.0 KB (added by skyper, 6 years ago)

version 4 only warning about communications_tower < 75m

  • resources/data/validator/combinations.mapcss

     
    142142*[office=government][!government],
    143143*[power=generator][!generator:source],
    144144*[amenity=social_facility][!social_facility],
    145 *[amenity=place_of_worship][!religion] {
     145*[amenity=place_of_worship][!religion],
     146*[man_made=tower][!tower:type] {
    146147  throwWarning: tr("{0} without {1}", "{0.tag}", "{1.key}");
    147148  group: tr("missing tag");
    148149}
     
    728729*[source:maxspeed][!/^maxspeed:?/] {
    729730  throwWarning: tr("{0} without {1} or {2}", "{0.key}", "maxspeed", "maxspeed:*");
    730731  group: tr("missing tag");
    731 }
    732  No newline at end of file
     732}
     733
     734/* tower vs. communications_tower, #16898 */
     735*[man_made=communications_tower][height =~ /^((7[0-4]|[1-6]?[0-9])(\.[0-9]*)?( m)?|(2(4[0-5]|[0-3][0-9])|1?[0-9]?[0-9])((\.[0-9]*)?( ft|\')|\'(11|10|[0-9])(\.[0-9]*)?\"))$/] { /* 75m ~ 246ft ~ 246' */
     736  throwWarning: tr("{0} and {1} below 75m is uncommon. Maybe, {2} together with {3} is a better choice", "{0.tag}", "{1.key}", "man_made=tower", "tower:type=communication");
     737  group: tr("suspicious tag combination");
     738  assertMatch: "relation man_made=communications_tower height=58";
     739  assertMatch: "node man_made=communications_tower height=\"74 m\"";
     740  assertMatch: "node man_made=communications_tower height=0.8";
     741  assertMatch: "relation man_made=communications_tower height=245'";
     742  assertMatch: "way man_made=communications_tower height=\"224.22 ft\"";
     743  assertMatch: "way man_made=communications_tower height=231'10.22\"";
     744  assertNoMatch: "node man_made=communications_tower height=\"75 m\"";
     745  assertNoMatch: "node man_made=communications_tower height=75.72";
     746  assertNoMatch: "way man_made=communications_tower height=\"328.22 ft\"";
     747  assertNoMatch: "relation man_made=communications_tower height=4358'8\"";
     748  assertNoMatch: "relation height=4358'";
     749}