Ticket #23932: cycleway_buffer_3.patch

File cycleway_buffer_3.patch, 6.8 KB (added by huntertur, 19 months ago)

cycleway:buffer support, 2024-09-22 version

  • 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

     
    779779  group: tr("suspicious tag combination");
    780780}
    781781
    782 /* #17967 */
    783 *[highway=cycleway][cycleway=track] {
     782/* #17967, #23932 */
     783*[highway=cycleway][/^cycleway(:.*)?$/] {
    784784  throwWarning: tr("{0} together with {1}. Remove {1}.", "{0.tag}", "{1.tag}");
    785785  group: tr("suspicious tag combination");
    786786  fixRemove: "cycleway";
     787  assertMatch: "way highway=cycleway cycleway=track";
     788  assertMatch: "way highway=cycleway cycleway:buffer=yes";
     789  assertNoMatch: "way highway=cycleway";
    787790}
    788791
    789792/* #17973, #18183, #18331, #20318 */
     
    10651068  throwWarning: tr("{0} is lower or equal to {1} on {2}", "{1.key}", "{2.key}", "{0.key}");
    10661069  group: tr("suspicious tag combination");
    10671070}
     1071
     1072/* #23932 */
     1073way[cycleway:right][cycleway:right!=lane][/^cycleway(:right|:both|):buffer$/],
     1074way[cycleway:left][cycleway:left!=lane][/^cycleway(:left|:both|):buffer$/],
     1075way[cycleway:both][cycleway:both!=lane][/^cycleway(:right|:left|:both|):buffer$/],
     1076way[cycleway][cycleway!=lane][/^cycleway(:right|:left|:both|):buffer$/] {
     1077  throwWarning: tr("{0} together with {1}", "{1.tag}", "{2.tag}");
     1078  group: tr("suspicious tag combination");
     1079  assertMatch: "way cycleway:right=separate cycleway:right:buffer=yes";
     1080  assertMatch: "way cycleway:left=shared_lane cycleway:buffer=no";
     1081  assertMatch: "way cycleway:both=track cycleway:left:buffer=yes";
     1082  assertMatch: "way cycleway=shared_busway cycleway:buffer=no";
     1083  assertNoMatch: "way cycleway:right=lane cycleway:right:buffer=no";
     1084  assertNoMatch: "way cycleway:left=lane cycleway:left:buffer=yes";
     1085  assertNoMatch: "way cycleway:both=lane cycleway:both:buffer=no";
     1086  assertNoMatch: "way cycleway:both=lane cycleway:left:buffer=yes";
     1087  assertNoMatch: "way cycleway:both=lane cycleway:buffer=no";
     1088  assertNoMatch: "way cycleway=lane cycleway:buffer=yes";
     1089  assertNoMatch: "way cycleway=lane cycleway:right:buffer=no";
     1090  assertNoMatch: "way cycleway=lane cycleway:both:buffer=no";
     1091}
     1092
     1093way[cycleway:right=separate][/^cycleway(:right|:both):.*$/],
     1094way[cycleway:left=separate][/^cycleway(:left|:both):.*$/],
     1095way[cycleway:both=separate][/^cycleway(:right|:left|:both):.*$/],
     1096way[cycleway=separate][/^cycleway(:right|:left|:both):.*$/] {
     1097  throwWarning: tr("{0} together with {1}. Remove {1}.", "{0.tag}", "{1.tag}");
     1098  group: tr("suspicious tag combination");
     1099  assertMatch: "way cycleway:right=separate cycleway:right:surface=asphalt";
     1100  assertMatch: "way cycleway:right=separate cycleway:both:buffer=yes";
     1101  assertMatch: "way cycleway:right=separate cycleway:surface=asphalt";
     1102  assertMatch: "way cycleway:right=separate cycleway:buffer=no";
     1103  assertMatch: "way cycleway:left=separate cycleway:left:surface=asphalt";
     1104  assertMatch: "way cycleway:left=separate cycleway:both:buffer=yes";
     1105  assertMatch: "way cycleway:left=separate cycleway:surface=asphalt";
     1106  assertMatch: "way cycleway:left=separate cycleway:buffer=no";
     1107  assertMatch: "way cycleway:both=separate cycleway:right:surface=asphalt";
     1108  assertMatch: "way cycleway:both=separate cycleway:left:surface=asphalt";
     1109  assertMatch: "way cycleway:both=separate cycleway:both:buffer=yes";
     1110  assertMatch: "way cycleway:both=separate cycleway:surface=asphalt";
     1111  assertMatch: "way cycleway:both=separate cycleway:buffer=no";
     1112  assertMatch: "way cycleway=separate cycleway:right:surface=asphalt";
     1113  assertMatch: "way cycleway=separate cycleway:left:surface=asphalt";
     1114  assertMatch: "way cycleway=separate cycleway:both:buffer=yes";
     1115  assertMatch: "way cycleway=separate cycleway:surface=asphalt";
     1116  assertMatch: "way cycleway=separate cycleway:buffer=no";
     1117  assertNoMatch: "way cycleway:right=separate cycleway:left:surface=asphalt";
     1118  assertNoMatch: "way cycleway:left=separate cycleway:right:buffer=yes";
     1119  assertNoMatch: "way cycleway:both=separate";
     1120  assertNoMatch: "way cycleway=separate";
     1121}
     1122
     1123way[cycleway:right:buffer][!cycleway:right][!cycleway:both][!cycleway],
     1124way[cycleway:left:buffer][!cycleway:left][!cycleway:both][!cycleway],
     1125way[cycleway:both:buffer][!cycleway:both][!cycleway][!cycleway:left],
     1126way[cycleway:both:buffer][!cycleway:both][!cycleway][!cycleway:right],
     1127way[cycleway:buffer][!cycleway][!cycleway:both][!cycleway:left],
     1128way[cycleway:buffer][!cycleway][!cycleway:both][!cycleway:right] {
     1129  throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
     1130  group: tr("missing tag");
     1131  fixAdd: "{1.key}=lane";
     1132  assertMatch: "way cycleway:right:buffer=yes";
     1133  assertMatch: "way cycleway:left=lane cycleway:right:buffer=no";
     1134  assertMatch: "way cycleway:left:buffer=yes";
     1135  assertMatch: "way cycleway:right=lane cycleway:left:buffer=yes";
     1136  assertMatch: "way cycleway:both:buffer=yes";
     1137  assertMatch: "way cycleway:buffer=no";
     1138  assertMatch: "way cycleway:left=lane cycleway:both:buffer=yes";
     1139  assertMatch: "way cycleway:right=lane cycleway:buffer=no";
     1140  assertNoMatch: "way cycleway:right=lane cycleway:right:buffer=yes";
     1141  assertNoMatch: "way cycleway:left=lane cycleway:left:buffer=yes";
     1142  assertNoMatch: "way cycleway:both=lane cycleway:both:buffer=yes";
     1143  assertNoMatch: "way cycleway=lane cycleway:buffer=yes";
     1144  assertNoMatch: "way cycleway:left=lane cycleway:right=lane cycleway:both:buffer=yes";
     1145  assertNoMatch: "way cycleway:left=lane cycleway:right=lane cycleway:buffer=no";
     1146}