Ticket #23932: cycleway_buffer_4.patch

File cycleway_buffer_4.patch, 6.2 KB (added by huntertur, 4 months ago)

cycleway:buffer support, 2024-09-22 version 2

  • resources/data/defaultpresets.xml

     
    13231323            <space />
    13241324            <optional text="Cycleway Lane Attributes">
    13251325                <combo key="cycleway:both:lane" text="Lane type (both)" values_context="cycleway" values="advisory,exclusive"/>
     1326                <check key="cycleway:both:buffer" text="Has buffer between automobiles and cycleway (both)" />
    13261327                <combo key="cycleway:left:lane" text="Lane type (left)" values_context="cycleway" values="advisory,exclusive"/>
     1328                <check key="cycleway:left:buffer" text="Has buffer between automobiles and cycleway (left)" />
    13271329                <combo key="cycleway:right:lane" text="Lane type (right)" values_context="cycleway" values="advisory,exclusive"/>
     1330                <check key="cycleway:right:buffer" text="Has buffer between automobiles and cycleway (right)" />
    13281331            </optional>
    13291332            <optional text="Edit Highway Attributes:">
    13301333                <combo key="highway" text="Highway" values="motorway,motorway_link,trunk,trunk_link,primary,primary_link,secondary,secondary_link,tertiary,tertiary_link,unclassified,residential,living_street,service,bus_guideway,construction" values_context="Highway" values_sort="false" />
  • resources/data/validator/combinations.mapcss

     
    10651065  throwWarning: tr("{0} is lower or equal to {1} on {2}", "{1.key}", "{2.key}", "{0.key}");
    10661066  group: tr("suspicious tag combination");
    10671067}
     1068
     1069/* #23932 */
     1070way[cycleway:right][cycleway:right!=lane][cycleway:right!=separate][/^cycleway(:right|:both|):buffer/],
     1071way[cycleway:left][cycleway:left!=lane][cycleway:left!=separate][/^cycleway(:left|:both|):buffer/],
     1072way[cycleway:both][cycleway:both!=lane][cycleway:both!=separate][/^cycleway(:right|:left|:both|):buffer/],
     1073way[cycleway][cycleway!=lane][cycleway!=separate][/^cycleway(:right|:left|:both|):buffer/] {
     1074  throwWarning: tr("{0} together with {1}", "{0.tag}", "{2.tag}");
     1075  group: tr("suspicious tag combination");
     1076  assertMatch: "way cycleway:right=separate cycleway:right:buffer=yes";
     1077  assertMatch: "way cycleway:left=shared_lane cycleway:buffer=no";
     1078  assertMatch: "way cycleway:both=track cycleway:left:buffer=yes";
     1079  assertMatch: "way cycleway=shared_busway cycleway:buffer=no";
     1080  assertNoMatch: "way cycleway:right=lane cycleway:right:buffer=no";
     1081  assertNoMatch: "way cycleway:right=separate cycleway:right:buffer=yes";
     1082  assertNoMatch: "way cycleway:left=lane cycleway:left:buffer=yes";
     1083  assertNoMatch: "way cycleway:both=lane cycleway:both:buffer=no";
     1084  assertNoMatch: "way cycleway:both=lane cycleway:left:buffer=yes";
     1085  assertNoMatch: "way cycleway:both=lane cycleway:buffer=no";
     1086  assertNoMatch: "way cycleway=lane cycleway:buffer=yes";
     1087  assertNoMatch: "way cycleway=lane cycleway:right:buffer=no";
     1088  assertNoMatch: "way cycleway=lane cycleway:both:buffer=no";
     1089}
     1090
     1091way[cycleway:right=separate][/^cycleway(:right|:both):./],
     1092way[cycleway:left=separate][/^cycleway(:left|:both):./],
     1093way[cycleway:both=separate][/^cycleway(:right|:left|:both):./],
     1094way[cycleway=separate][/^cycleway(:right|:left|:both):./] {
     1095  throwWarning: tr("{0} together with {1}. Remove {1}.", "{0.tag}", "{1.tag}");
     1096  group: tr("suspicious tag combination");
     1097  assertMatch: "way cycleway:right=separate cycleway:right:surface=asphalt";
     1098  assertMatch: "way cycleway:right=separate cycleway:both:buffer=yes";
     1099  assertMatch: "way cycleway:left=separate cycleway:left:surface=asphalt";
     1100  assertMatch: "way cycleway:left=separate cycleway:both:buffer=yes";
     1101  assertMatch: "way cycleway:both=separate cycleway:right:surface=asphalt";
     1102  assertMatch: "way cycleway:both=separate cycleway:left:surface=asphalt";
     1103  assertMatch: "way cycleway:both=separate cycleway:both:buffer=yes";
     1104  assertMatch: "way cycleway=separate cycleway:right:surface=asphalt";
     1105  assertMatch: "way cycleway=separate cycleway:left:surface=asphalt";
     1106  assertMatch: "way cycleway=separate cycleway:both:buffer=yes";
     1107  assertNoMatch: "way cycleway:right=separate cycleway:left:surface=asphalt";
     1108  assertNoMatch: "way cycleway:left=separate cycleway:right:buffer=yes";
     1109  assertNoMatch: "way cycleway:both=separate";
     1110  assertNoMatch: "way cycleway=separate";
     1111}
     1112
     1113way[/^cycleway:right:/][!cycleway:right][!cycleway:both][!cycleway],
     1114way[/^cycleway:left:/][!cycleway:left][!cycleway:both][!cycleway],
     1115way[/^cycleway:both:/][!cycleway:both][!cycleway][!cycleway:left],
     1116way[/^cycleway:both:/][!cycleway:both][!cycleway][!cycleway:right],
     1117way[cycleway:buffer][!cycleway][!cycleway:both][!cycleway:left],
     1118way[cycleway:buffer][!cycleway][!cycleway:both][!cycleway:right] {
     1119  throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
     1120  group: tr("missing tag");
     1121  suggestAlternative: "{0.tag} + {1.key}=*";
     1122  assertMatch: "way cycleway:right=lane cycleway:left:buffer=yes";
     1123  assertMatch: "way cycleway:right:buffer=yes";
     1124  assertMatch: "way cycleway:right:surface=asphalt";
     1125  assertMatch: "way cycleway:left=lane cycleway:right:buffer=no";
     1126  assertMatch: "way cycleway:left:buffer=yes";
     1127  assertMatch: "way cycleway:left:surface=asphalt";
     1128  assertMatch: "way cycleway:both:buffer=yes";
     1129  assertMatch: "way cycleway:both:surface=asphalt";
     1130  assertMatch: "way cycleway:buffer=no";
     1131  assertMatch: "way cycleway:left=lane cycleway:both:buffer=yes";
     1132  assertMatch: "way cycleway:right=lane cycleway:buffer=no";
     1133  assertNoMatch: "way cycleway:right=lane cycleway:right:buffer=yes";
     1134  assertNoMatch: "way cycleway:left=lane cycleway:left:buffer=yes";
     1135  assertNoMatch: "way cycleway:both=lane cycleway:both:buffer=yes";
     1136  assertNoMatch: "way cycleway=lane cycleway:buffer=yes";
     1137  assertNoMatch: "way cycleway:left=lane cycleway:right=lane cycleway:both:buffer=yes";
     1138  assertNoMatch: "way cycleway:left=lane cycleway:right=lane cycleway:buffer=no";
     1139  assertNoMatch: "way cycleway=lane cycleway:surface=asphalt";
     1140  assertNoMatch: "way cycleway:both=lane cycleway:both:surface=asphalt";
     1141}