Ticket #21927: cycleway_asl_direction_2.patch

File cycleway_asl_direction_2.patch, 1.8 KB (added by huntertur, 4 months ago)

Reduce directions to forward and backward, and add validation rules

  • resources/data/defaultpresets.xml

     
    15231523        <item name="Advanced stop line" icon="presets/vehicle/asl.svg" type="node" preset_name_label="true">
    15241524            <link wiki="Tag:cycleway=asl" />
    15251525            <key key="cycleway" value="asl" />
     1526            <optional>
     1527                <combo key="direction" text="Direction" values="forward,backward" values_sort="false" />
     1528            </optional>
    15261529        </item> <!-- Advanced stop line -->
    15271530        <item name="Mini-Roundabout" icon="presets/vehicle/restriction/mini_roundabout_left.svg" type="node" preset_name_label="true">
    15281531            <link wiki="Tag:highway=mini_roundabout" />
  • resources/data/validator/combinations.mapcss

     
    11371137  assertNoMatch: "way highway=path segregated=yes cycleway:surface=needles footway:surface=paving_stones";
    11381138  assertNoMatch: "way highway=primary oneway=yes bicycle:lanes=no|designated|yes cycleway:lanes=|lane|no";
    11391139}
     1140
     1141/* #21927 */
     1142way[!cycleway][!cycleway:right][!cycleway:left][!cycleway:both][!cycleway:lanes] > node[cycleway=asl] {
     1143  throwWarning: tr("{0} not on cycleway", "{0.tag}");
     1144  group: tr("suspicious tag combination");
     1145}
     1146
     1147way[/^oneway(:bicycle)?$/!~/^yes$/] > node[cycleway=asl][!direction],
     1148way[!oneway][!oneway:bicycle] > node[cycleway=asl][!direction] {
     1149  throwWarning: tr("{0} without {1}", "{0.tag}", "{1.key}");
     1150  group: tr("missing tag");
     1151  suggestAlternative: "{0.tag} + {1.key}=*";
     1152}