Ticket #17606: josm_17606.patch

File josm_17606.patch, 2.8 KB (added by skyper, 3 years ago)

new patch including all changes of the ticket

  • resources/data/validator/combinations.mapcss

     
    913913  assertMatch: "way highway=living_street maxspeed=30";
    914914  assertMatch: "way highway=living_street maxspeed=\"20 mph\"";
    915915}
     916
     917/* piste subtags, see #17606 */
     918way[piste:type=nordic][!piste:grooming] {
     919  throwWarning: tr("No grooming defined for {0} skiing, add {1}", "nordic", "piste:grooming=");
     920  group: tr("missing tag");
     921  assertMatch:   "way piste:type=nordic";
     922  assertNoMatch: "way piste:type=nordic piste:grooming=classic";
     923}
     924
     925way[piste:type =~ /^downhill|nordic|skitour$/][!piste:difficulty][count(parent_tags("piste:difficulty")) == 0] {
     926  set missing_parent_piste_difficulty;
     927}
     928way.missing_parent_piste_difficulty:new,
     929way.missing_parent_piste_difficulty:in-downloaded-area!:new {
     930  throwWarning: tr("No difficulty defined for skiing, add {0}", "piste:difficulty=");
     931  group: tr("missing tag");
     932  set missing_piste_difficulty;
     933  assertMatch:   "way piste:type=nordic (count(parent_tag("piste:difficulty")) == 0)";
     934  assertNoMatch: "way piste:type=nordic (count(parent_tag("piste:difficulty")) == 1)";
     935  assertNoMatch: "way piste:type=nordic piste:difficulty=easy";
     936}
     937relation[piste:type =~ /^downhill|nordic|skitour$/][!piste:difficulty] >
     938 way[!piste:difficulty]!.missing_piste_difficulty {
     939  throwWarning: tr("No difficulty defined for skiing, add {0}", "piste:difficulty=");
     940  group: tr("missing tag");
     941  set missing_piste_difficulty_both;
     942  assertMatch:   "way piste:type=nordic (count(parent_tag("piste:difficulty")) == 0)";
     943  assertNoMatch: "way piste:type=nordic (count(parent_tag("piste:difficulty")) == 1)";
     944  assertNoMatch: "way piste:type=nordic piste:difficulty=easy";
     945}
     946way[piste:type=nordic][!piste:difficulty]!.missing_piste_difficulty!.missing_piste_difficulty_both {
     947  throwOther: tr("No difficulty defined for skiing, add {0}", "piste:difficulty=");
     948  group: tr("missing tag");
     949  assertMatch:   "way piste:type=nordic";
     950  assertNoMatch: "way piste:type=nordic piste:difficulty=easy";
     951}
     952
     953relation[piste:type =~ /^downhill|nordic|skitour$/][!piste:difficulty] {
     954  throwOther: tr("No difficulty defined for skiing, add {0}", "piste:difficulty=");
     955  group: tr("missing tag");
     956  assertMatch:   "relation piste:type=nordic";
     957  assertNoMatch: "relation piste:type=nordic piste:difficulty=easy";
     958}
     959relation[piste:type=nordic][!piste:grooming]{
     960  throwOther: tr("No grooming defined for {0} skiing, add {1}", "nordic", "piste:grooming=");
     961  group: tr("missing tag");
     962  assertMatch:   "relation piste:type=nordic";
     963  assertNoMatch: "relation piste:type=nordic piste:grooming=classic";
     964}