Ticket #19996: 19996_v2.patch

File 19996_v2.patch, 1.1 KB (added by reichg, 3 years ago)

This patch gives warning that "motor_vehicle" on tertiary_link and above have the warning "Optional tag motor_vehicle=yes". Anything below tertiary_link is excluded.

  • resources/data/validator/unnecessary.mapcss

     
    11*[access][highway=proposed],
    2 *[motor_vehicle?][!vehicle][!access][bicycle_road!=yes][highway =~ /^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|service|living_street)$/],
    32*[bridge=no],
    43*[building=no],
    54*[elevation="0"],
     
    1110  assertMatch: "way layer=0";
    1211  assertMatch: "way bridge=no";
    1312  assertMatch: "way highway=proposed access=no";
     13}
     14
     15/* #19996 */
     16*[motor_vehicle?][!vehicle][!access][bicycle_road!=yes][highway =~ /^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link)$/] {
     17  throwWarning: tr("{0} is optional", "{0.tag}");
     18  group: tr("optional tag");
    1419  assertMatch: "way highway=motorway motor_vehicle=yes";
    1520  assertNoMatch: "way highway=motorway access=no motor_vehicle=yes";
    1621}