Changeset 16778 in josm for trunk


Ignore:
Timestamp:
2020-07-15T21:56:42+02:00 (4 years ago)
Author:
Klumbumbus
Message:

fix #19094 - Warn about placement:forward/backward=transition (patch by skyper)

File:
1 edited

Legend:

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

    r16777 r16778  
    775775  assertNoMatch: "way name=\"Florist Gump\" fixme=\"the name might have changed\"";
    776776}
     777
     778/* #19094 */
     779way[highway][placement=transition][join_list("", uniq_list(tag_regex("^placement:.*$")))==transition],
     780way[highway][!placement][/^placement:.*$/][join_list("", uniq_list(tag_regex("^placement:.*$")))==transition] {
     781  throwWarning: tr("Use {0} only as value of {1}", "transition", "placement");
     782  set PlacementTransitionWarning;
     783  fixAdd: "placement=transition";
     784  fixRemove: "placement:forward";
     785  fixRemove: "placement:backward";
     786  fixRemove: "placement:both_ways";
     787  assertMatch: "way highway=primary placement=transition placement:both_ways=transition";
     788  assertMatch: "way highway=primary placement:backward=transition placement:forward=transition";
     789  assertNoMatch: "way highway=primary placement:backward=middle_of:1 placement:forward=transition";
     790  assertNoMatch: "way highway=primary placement=middle_of:1 placement:backward=transition placement:forward=transition";
     791}
     792way[highway][placement][/^placement:.*$/]!.PlacementTransitionWarning,
     793way[highway]["placement:forward"]["placement:backward"]!.PlacementTransitionWarning,
     794way[highway]["placement:forward"]["placement:both_ways"]!.PlacementTransitionWarning,
     795way[highway]["placement:backward"]["placement:both_ways"]!.PlacementTransitionWarning {
     796  throwError: tr("{0} together with {1}", "{1.key}", "{2.key}");
     797  group: tr("suspicious tag combination");
     798  assertMatch: "way highway=primary placement=left_of:2 placement:forward=right_of:1";
     799  assertNoMatch: "way highway=primary placement:forward=right_of:1";
     800  assertNoMatch: "way highway=primary placement:forward=transition placement:both_ways=transition";
     801}
Note: See TracChangeset for help on using the changeset viewer.