| | 1 | = Possible missing weekdays = |
| | 2 | |
| | 3 | This ruleset checks for leisure=swimming_pool that have too much information and may be instead a leisure=sports_centre + sport = swimming. |
| | 4 | |
| | 5 | {{{ |
| | 6 | #!rule |
| | 7 | |
| | 8 | meta |
| | 9 | { |
| | 10 | title: "swimming_pool tag confusion"; |
| | 11 | version: "0.1"; |
| | 12 | description: "Detect Suspiscious leisure=swimming_pool"; |
| | 13 | author: "nlehuby"; |
| | 14 | baselanguage: "en"; |
| | 15 | watch-modified: true; |
| | 16 | } |
| | 17 | |
| | 18 | node[leisure=swimming_pool][name] |
| | 19 | { |
| | 20 | throwWarning: tr("If this is a facility containing one or more swimming pools it should be tagged leisure=sports_centre + sport=swimming."); |
| | 21 | group: tr("Suspiscious tag association - possible confusion between swimming_pool and sports_centre"); |
| | 22 | |
| | 23 | } |
| | 24 | |
| | 25 | node[leisure=swimming_pool][building=yes], |
| | 26 | way[leisure=swimming_pool][building=yes], |
| | 27 | relation[leisure=swimming_pool][building=yes] |
| | 28 | { |
| | 29 | throwWarning: tr("If this is a facility containing one or more swimming pools it should be tagged leisure=sports_centre + sport=swimming."); |
| | 30 | group: tr("Suspiscious tag association - possible confusion between swimming_pool and sports_centre"); |
| | 31 | |
| | 32 | } |
| | 33 | |
| | 34 | node[leisure=swimming_pool][website], |
| | 35 | way[leisure=swimming_pool][website], |
| | 36 | relation[leisure=swimming_pool][website] |
| | 37 | { |
| | 38 | throwWarning: tr("If this is a facility containing one or more swimming pools it should be tagged leisure=sports_centre + sport=swimming."); |
| | 39 | group: tr("Suspiscious tag association - possible confusion between swimming_pool and sports_centre"); |
| | 40 | |
| | 41 | } |
| | 42 | |
| | 43 | node[leisure=swimming_pool][url], |
| | 44 | way[leisure=swimming_pool][url], |
| | 45 | relation[leisure=swimming_pool][url] |
| | 46 | { |
| | 47 | throwWarning: tr("If this is a facility containing one or more swimming pools it should be tagged leisure=sports_centre + sport=swimming."); |
| | 48 | group: tr("Suspiscious tag association - possible confusion between swimming_pool and sports_centre"); |
| | 49 | |
| | 50 | } |
| | 51 | |
| | 52 | node[leisure=swimming_pool][contact:website], |
| | 53 | way[leisure=swimming_pool][contact:website], |
| | 54 | relation[leisure=swimming_pool][contact:website] |
| | 55 | { |
| | 56 | throwWarning: tr("If this is a facility containing one or more swimming pools it should be tagged leisure=sports_centre + sport=swimming."); |
| | 57 | group: tr("Suspiscious tag association - possible confusion between swimming_pool and sports_centre"); |
| | 58 | |
| | 59 | } |
| | 60 | |
| | 61 | node[leisure=swimming_pool][contact:url], |
| | 62 | way[leisure=swimming_pool][contact:url], |
| | 63 | relation[leisure=swimming_pool][contact:url] |
| | 64 | { |
| | 65 | throwWarning: tr("If this is a facility containing one or more swimming pools it should be tagged leisure=sports_centre + sport=swimming."); |
| | 66 | group: tr("Suspiscious tag association - possible confusion between swimming_pool and sports_centre"); |
| | 67 | |
| | 68 | } |
| | 69 | |
| | 70 | node[leisure=swimming_pool][phone], |
| | 71 | way[leisure=swimming_pool][phone], |
| | 72 | relation[leisure=swimming_pool][phone] |
| | 73 | { |
| | 74 | throwWarning: tr("If this is a facility containing one or more swimming pools it should be tagged leisure=sports_centre + sport=swimming."); |
| | 75 | group: tr("Suspiscious tag association - possible confusion between swimming_pool and sports_centre"); |
| | 76 | |
| | 77 | } |
| | 78 | |
| | 79 | node[leisure=swimming_pool][contact:phone], |
| | 80 | way[leisure=swimming_pool][contact:phone], |
| | 81 | relation[leisure=swimming_pool][contact:phone] |
| | 82 | { |
| | 83 | throwWarning: tr("If this is a facility containing one or more swimming pools it should be tagged leisure=sports_centre + sport=swimming."); |
| | 84 | group: tr("Suspiscious tag association - possible confusion between swimming_pool and sports_centre"); |
| | 85 | |
| | 86 | } |
| | 87 | |
| | 88 | node[leisure=swimming_pool][wikipedia], |
| | 89 | way[leisure=swimming_pool][wikipedia], |
| | 90 | relation[leisure=swimming_pool][wikipedia] |
| | 91 | { |
| | 92 | throwWarning: tr("If this is a facility containing one or more swimming pools it should be tagged leisure=sports_centre + sport=swimming."); |
| | 93 | group: tr("Suspiscious tag association - possible confusion between swimming_pool and sports_centre"); |
| | 94 | |
| | 95 | } |
| | 96 | |
| | 97 | }}} |