Main categories of OpenStreetBrowser
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

183 lines
7.2 KiB

  1. type: "overpass"
  2. name:
  3. ca: Cultura - Mitjans/Wikidata
  4. en: Culture - Media/Wikidata
  5. fr: Culture - Média/Wikidata
  6. hu: Kultúra – média/Wikidata
  7. it: Cultura - Immagini/Wikidata
  8. pl: Kultura - Media/Wikidane
  9. pt-br: Cultura - Imagem e Wikidata
  10. pt: Cultura - Media/Wikidata
  11. tr: Kültür - Medya/Wikidata
  12. query:
  13. 15: |
  14. (
  15. nwr[historic];
  16. nwr[tourism~'^(.*;|)(attraction|artwork)(;.*|)$'];
  17. nwr[heritage];
  18. nwr[amenity~'^(.*;|)(fountain|arts_centre|place_of_worship|theatre)(;.*|)$'];
  19. nwr[man_made~'^(.*;|)(windmill|watermill|bridge|cairn|cross|geoglyph|hongsalmun|iljumun|lighthouse|obelisk|observatory|offshore_platform|paifang|stupa|torii)(;.*|)$'];
  20. )
  21. feature:
  22. pre: |
  23. {% set cat = 'no' %}
  24. {% set str = null %}
  25. {% if tags.wikidata %}
  26. {% set cat = 'wikidata' %}
  27. {% set wikidata = tags.wikidata|wikidataEntity %}
  28. {% if wikidata and wikidata.claims.P18|length == 0 %}
  29. {% set cat = 'wikidata_no_image' %}
  30. {% endif %}
  31. {% if wikidata.claims.P31[0].mainsnak.datavalue.value.id in ['Q5'] %}
  32. {% set cat = 'wikidata_human' %}
  33. {% endif %}
  34. {% elseif tags.wikipedia %}
  35. {% set cat = 'wikipedia_no_wikidata' %}
  36. {% elseif tags.wikimedia_commons or tags.image %}
  37. {% set cat = 'has_image' %}
  38. {% set str = tags.wikimedia_commons ? 'has wikimedia_commons tag' : 'has image tag' %}
  39. {% endif %}
  40. {% set def = const.categories[cat] %}
  41. exclude: |
  42. {% if filter.category == 'wikidata_no_image' %}
  43. {{ (not wikidata) or (wikidata.claims.P18|length != 0) }}
  44. {% elseif filter.category == 'no_image_or_wikidata_no_image' %}
  45. {{ (tags.wikidata and not wikidata) or (wikidata.claims.P18|length != 0) }}
  46. {% elseif filter.category == 'wikidata_human' %}
  47. {{ wikidata.claims.P31[0].mainsnak.datavalue.value.id not in ['Q5'] }}
  48. {% endif %}
  49. body: |
  50. {{ str|default(def.text) }}
  51. style:
  52. color: |
  53. {{ def.color }}
  54. description: |
  55. {% if tags.historic and tags.historic != 'yes' %}
  56. {{ tagTransList('historic', tags.historic) }}
  57. {% if tags.historic == 'memorial' and tags.memorial %}
  58. ({{ tagTransList('memorial', tags.memorial) }})
  59. {% endif %}
  60. {% elseif tags.tourism %}
  61. {{ tagTransList('tourism', tags.tourism) }}
  62. {% elseif tags.amenity %}
  63. {{ tagTransList('amenity', tags.amenity) }}
  64. {% elseif tags.building %}
  65. {{ tags.building == 'yes' ? keyTrans('building') : tagTrans('building', tags.building) }}
  66. {% elseif tags.heritage %}
  67. {{ keyTrans('heritage') }}
  68. {% elseif tags.man_made %}
  69. {{ tagTransList('man_made', tags.man_made) }}
  70. {% endif %}
  71. markerSymbol: "{{ markerPointer({ fillColor: def.color })|raw }}"
  72. listMarkerSymbol: "{{ markerCircle({ fillColor: def.color })|raw }}"
  73. markerSign: |
  74. {% set icon = '' %}
  75. {% for kv, d in const.types|reverse %}
  76. {% set k = kv|split('=')[0] %}
  77. {% set v = kv|split('=')[1] %}
  78. {% if d.icon and v and attribute(tags, k) == v %}
  79. {% set icon = d.icon %}
  80. {% endif %}
  81. {% endfor %}
  82. <span style='color: white;'>{{ icon|raw }}</span>
  83. filter:
  84. type:
  85. name: "{{ trans('filter:type') }}"
  86. show_default: "true"
  87. query: "nwr[{{ value }}]"
  88. type: "select"
  89. key: "tourism"
  90. values: |
  91. {% for kv, d in const.types %}
  92. {% set k = kv|split('=')[0] %}
  93. {% set v = kv|split('=')[1] %}
  94. {% set d = d|default({}) %}
  95. <option value='{{ kv }}' query='nwr[{{ d.query|default(kv) }}]'>{% if d.trans %}{{ trans(d.trans) }}{% elseif not v %}{{ keyTrans(k) }}{% else %}{{ tagTrans(k, v) }}{% endif %}</option>
  96. {% endfor %}
  97. op: "has"
  98. category:
  99. name: "{{ trans('category') }}"
  100. show_default: "true"
  101. type: "select"
  102. values: |
  103. <option value='no' query='nwr[!image][!wikimedia_commons][!wikidata][!wikipedia]'>No image, wikimedia_commons or wikidata</option>
  104. <option value='wikipedia_no_wikidata' query='nwr[!wikidata][wikipedia]'>wikipedia tag found without corresponding wikidata tag</option>
  105. <option value='has_image' query='(nwr[!wikidata][image];nwr[!wikidata][wikimedia_commons];)'>image or wikimedia_commons tag but no wikidata</option>
  106. <option value='wikidata' query='nwr[wikidata]'>has wikidata tag</option>
  107. <option value='wikidata_no_image' query='nwr[wikidata]'>has wikidata tag, but wikidata object does not have an image</option>
  108. <option value='no_image_or_wikidata_no_image' query='(nwr[!image][!wikimedia_commons][!wikidata][!wikipedia];nwr[wikidata];)'>no image/wikimedia_commons OR wikidata without image</option>
  109. <option value='wikidata_human' query='nwr[wikidata]'>wikidata tag points to a human, should most likely be 'subject:wikidata'</option>
  110. info: |
  111. <table>
  112. {% for k, def in const.categories %}
  113. <tr>
  114. <td>
  115. {{ markerCircle({ fillColor: def.color })|raw }}
  116. </td>
  117. <td>{{ def.text }}</td>
  118. </tr>
  119. {% endfor %}
  120. </table>
  121. This category lists artwork, memorials, historic and heritage protected objects. These should have an <a target="_blank" href="https://wiki.openstreetmap.org/wiki/Key:image">image</a> or <a target="_blank" href="https://wiki.openstreetmap.org/wiki/Key:wikimedia_commons">wikimedia_commons</a> tag, or (even better) a <a target="_blank" href="https://wiki.openstreetmap.org/wiki/Key:wikidata">wikidata</a> tag pointing to the object's entry.<br>
  122. Memorials erroneously often have a wikidata (and wikipedia) tag of the person/event, which should be changed to <a target="_blank" href="https://wiki.openstreetmap.org/wiki/Key:wikidata#Secondary_Wikidata_links">subject:wikidata</a> resp. <a target="_blank" href="https://wiki.openstreetmap.org/wiki/Key:wikipedia#Secondary_Wikipedia_links">subject:wikipedia</a>".
  123. const:
  124. types:
  125. tourism=artwork:
  126. icon: '<i class="fas fa-palette"></i>'
  127. tourism=attraction:
  128. icon: '<i class="fas fa-chess"></i>'
  129. historic=memorial:
  130. icon: '<i class="fas fa-monument"></i>'
  131. historic=monument:
  132. icon: '<i class="fas fa-monument"></i>'
  133. historic=wayside_cross:
  134. icon: '<i class="fas fa-cross"></i>'
  135. historic=wayside_shrine:
  136. icon: '<i class="fas fa-vihara"></i>'
  137. historic=building:
  138. icon: '<i class="fas fa-home"></i>'
  139. amenity=fountain:
  140. icon: '<img data-src="temaki:fountain?stroke=white">'
  141. amenity=arts_centre:
  142. icon: '<i class="fas fa-university"></i>'
  143. amenity=place_of_worship:
  144. icon: '<i class="fas fa-place-of-worship"></i>'
  145. amenity=theatre:
  146. icon: '<i class="fas fa-theater-masks"></i>'
  147. heritage:
  148. man_made:
  149. other:
  150. query: 'nwr[historic][historic!~"^(memorial|monument|wayside_cross|wayside_shrine|building)$"]'
  151. trans: 'other'
  152. categories:
  153. 'no':
  154. color: red
  155. text: No image, wikimedia_commons or wikidata
  156. has_image:
  157. color: cyan
  158. text: image or wikimedia_commons tag but no wikidata
  159. wikidata_no_image:
  160. color: '#007fff'
  161. text: has wikidata tag, but wikidata object does not have an image
  162. wikidata:
  163. color: blue
  164. text: has wikidata tag
  165. wikidata_human:
  166. color: magenta
  167. text: wikidata tag points to a human, should most likely be 'subject:wikidata'
  168. wikipedia_no_wikidata:
  169. color: '#af00ff'
  170. text: wikipedia tag found without corresponding wikidata tag