| 916 | |
| 917 | /* piste subtags, see #17606 */ |
| 918 | way[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 | |
| 925 | way[piste:type =~ /^downhill|nordic|skitour$/][!piste:difficulty][count(parent_tags("piste:difficulty")) == 0] { |
| 926 | set missing_parent_piste_difficulty; |
| 927 | } |
| 928 | way.missing_parent_piste_difficulty:new, |
| 929 | way.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 | } |
| 937 | relation[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 | } |
| 946 | way[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 | |
| 953 | relation[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 | } |
| 959 | relation[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 | } |