Changeset 18523 in josm


Ignore:
Timestamp:
2022-07-21T21:05:32+02:00 (21 months ago)
Author:
taylor.smock
Message:

Fix #21235: Stop whitelisting footway=*, and add footway=separate to blacklist candidates for sidewalk=* (patch by JeroenHoek)

Patch notes by JeroenHoek (modified):

  • Add a check for footway=separate.
  • Remove special treatment for footway=none, none is added to the general footway=* check.
  • The whitelist for footway=* is removed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/resources/data/validator/highway.mapcss

    r18112 r18523  
    104104}
    105105
    106 /* footway, see #10851, #10976, #15439, #19389 */
     106/* footway, see #10851, #10976, #15439, #19389, #21235 */
    107107way[footway=left][/^footway:/],
    108108way[footway=right][/^footway:/],
    109109way[footway=both][/^footway:/],
     110way[footway=separate][/^footway:/],
    110111way[footway=no][/^footway:/] {
    111112  throwWarning: tr("{0} is deprecated, use {1} instead. Also check similar tags like {2}", "{0.tag}", "sidewalk", "{1.key}");
     
    113114  set not_fixable_footway;
    114115  assertMatch: "way footway=both footway:surface=asphalt";
    115 }
    116 way[footway=none][/footway:/] {
     116  assertMatch: "way footway=separate footway:surface=asphalt";
     117}
     118way[footway=none][/^footway:/] {
    117119  throwWarning: tr("{0} is deprecated, use {1} instead. Also check similar tags like {2}", "{0.tag}", "sidewalk=no", "{1.key}");
    118120  group: tr("deprecated tagging");
    119121  set not_fixable_footway;
    120 }
     122  assertMatch: "way footway=none footway:surface=asphalt";
     123  assertNoMatch: "way footway=no footway:surface=asphalt";
     124}
     125
    121126way[footway=left]!.not_fixable_footway,
    122127way[footway=right]!.not_fixable_footway,
    123128way[footway=both]!.not_fixable_footway,
     129way[footway=separate]!.not_fixable_footway,
    124130way[footway=no]!.not_fixable_footway {
    125131  throwWarning: tr("{0} is deprecated", "{0.tag}");
     
    129135  set fixable_footway;
    130136}
     137
    131138way[footway=none]!.not_fixable_footway {
    132139  throwWarning: tr("{0} is deprecated", "{0.tag}");
     
    136143  fixAdd: "sidewalk=no";
    137144  set fixable_footway;
    138 }
    139 way[footway][footway!=access_aisle][footway!=crossing][footway!=sidewalk]!.fixable_footway!.not_fixable_footway { /* do not trigger this rule if already one of the 4 previous rules applied */
    140   throwWarning: tr("Value of {0} should either be {1}, {2} or {3}. For sidewalks use {4} instead.", "{0.key}", "{1.value}", "{2.value}", "{3.value}", "sidewalk=left|right|both|no");
    141   assertNoMatch: "way footway=left";
    142   assertNoMatch: "way footway=none";
    143   assertNoMatch: "way footway=left footway:left:surface=asphalt";
    144   assertMatch: "way footway=bar";
    145145}
    146146
Note: See TracChangeset for help on using the changeset viewer.