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.

188 lines
7.5 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. nwr[natural=tree][denotation~'^(natural_monument|landmark)$'];
  21. )
  22. feature:
  23. pre: |
  24. {% set cat = 'no' %}
  25. {% set str = null %}
  26. {% if tags.wikidata %}
  27. {% set cat = 'wikidata' %}
  28. {% set wikidata = tags.wikidata|wikidataEntity %}
  29. {% if wikidata and wikidata.claims.P18|length == 0 %}
  30. {% set cat = 'wikidata_no_image' %}
  31. {% endif %}
  32. {% if wikidata.claims.P31[0].mainsnak.datavalue.value.id in ['Q5'] %}
  33. {% set cat = 'wikidata_human' %}
  34. {% endif %}
  35. {% elseif tags.wikipedia %}
  36. {% set cat = 'wikipedia_no_wikidata' %}
  37. {% elseif tags.wikimedia_commons or tags.image %}
  38. {% set cat = 'has_image' %}
  39. {% set str = tags.wikimedia_commons ? 'has wikimedia_commons tag' : 'has image tag' %}
  40. {% endif %}
  41. {% set def = const.categories[cat] %}
  42. exclude: |
  43. {% if filter.category == 'wikidata_no_image' %}
  44. {{ (not wikidata) or (wikidata.claims.P18|length != 0) }}
  45. {% elseif filter.category == 'no_image_or_wikidata_no_image' %}
  46. {{ (tags.wikidata and not wikidata) or (wikidata.claims.P18|length != 0) }}
  47. {% elseif filter.category == 'wikidata_human' %}
  48. {{ wikidata.claims.P31[0].mainsnak.datavalue.value.id not in ['Q5'] }}
  49. {% endif %}
  50. body: |
  51. {{ str|default(def.text) }}
  52. style:
  53. color: |
  54. {{ def.color }}
  55. description: |
  56. {% if tags.historic and tags.historic != 'yes' %}
  57. {{ tagTransList('historic', tags.historic) }}
  58. {% if tags.historic == 'memorial' and tags.memorial %}
  59. ({{ tagTransList('memorial', tags.memorial) }})
  60. {% endif %}
  61. {% elseif tags.tourism %}
  62. {{ tagTransList('tourism', tags.tourism) }}
  63. {% elseif tags.amenity %}
  64. {{ tagTransList('amenity', tags.amenity) }}
  65. {% elseif tags.building %}
  66. {{ tags.building == 'yes' ? keyTrans('building') : tagTrans('building', tags.building) }}
  67. {% elseif tags.heritage %}
  68. {{ keyTrans('heritage') }}
  69. {% elseif tags.man_made %}
  70. {{ tagTransList('man_made', tags.man_made) }}
  71. {% elseif tags.natural %}
  72. {{ tagTrans('natural', tags.natural) }} ({{ tagTrans('denotation', tags.denotation) }})
  73. {% endif %}
  74. markerSymbol: "{{ markerPointer({ fillColor: def.color })|raw }}"
  75. listMarkerSymbol: "{{ markerCircle({ fillColor: def.color })|raw }}"
  76. markerSign: |
  77. {% set icon = '' %}
  78. {% for kv, d in const.types|reverse %}
  79. {% set k = kv|split('=')[0] %}
  80. {% set v = kv|split('=')[1] %}
  81. {% if d.icon and v and attribute(tags, k) == v %}
  82. {% set icon = d.icon %}
  83. {% endif %}
  84. {% endfor %}
  85. <span style='color: white;'>{{ icon|raw }}</span>
  86. filter:
  87. type:
  88. name: "{{ trans('filter:type') }}"
  89. show_default: "true"
  90. query: "nwr[{{ value }}]"
  91. type: "select"
  92. key: "tourism"
  93. values: |
  94. {% for kv, d in const.types %}
  95. {% set k = kv|split('=')[0] %}
  96. {% set v = kv|split('=')[1] %}
  97. {% set d = d|default({}) %}
  98. <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>
  99. {% endfor %}
  100. op: "has"
  101. category:
  102. name: "{{ trans('category') }}"
  103. show_default: "true"
  104. type: "select"
  105. values: |
  106. <option value='no' query='nwr[!image][!wikimedia_commons][!wikidata][!wikipedia]'>No image, wikimedia_commons or wikidata</option>
  107. <option value='wikipedia_no_wikidata' query='nwr[!wikidata][wikipedia]'>wikipedia tag found without corresponding wikidata tag</option>
  108. <option value='has_image' query='(nwr[!wikidata][image];nwr[!wikidata][wikimedia_commons];)'>image or wikimedia_commons tag but no wikidata</option>
  109. <option value='wikidata' query='nwr[wikidata]'>has wikidata tag</option>
  110. <option value='wikidata_no_image' query='nwr[wikidata]'>has wikidata tag, but wikidata object does not have an image</option>
  111. <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>
  112. <option value='wikidata_human' query='nwr[wikidata]'>wikidata tag points to a human, should most likely be 'subject:wikidata'</option>
  113. info: |
  114. <table>
  115. {% for k, def in const.categories %}
  116. <tr>
  117. <td>
  118. {{ markerCircle({ fillColor: def.color })|raw }}
  119. </td>
  120. <td>{{ def.text }}</td>
  121. </tr>
  122. {% endfor %}
  123. </table>
  124. 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>
  125. 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>".
  126. const:
  127. types:
  128. tourism=artwork:
  129. icon: '<i class="fas fa-palette"></i>'
  130. tourism=attraction:
  131. icon: '<i class="fas fa-chess"></i>'
  132. historic=memorial:
  133. icon: '<i class="fas fa-monument"></i>'
  134. historic=monument:
  135. icon: '<i class="fas fa-monument"></i>'
  136. historic=wayside_cross:
  137. icon: '<i class="fas fa-cross"></i>'
  138. historic=wayside_shrine:
  139. icon: '<i class="fas fa-vihara"></i>'
  140. historic=building:
  141. icon: '<i class="fas fa-home"></i>'
  142. amenity=fountain:
  143. icon: '<img data-src="temaki:fountain?stroke=white">'
  144. amenity=arts_centre:
  145. icon: '<i class="fas fa-university"></i>'
  146. amenity=place_of_worship:
  147. icon: '<i class="fas fa-place-of-worship"></i>'
  148. amenity=theatre:
  149. icon: '<i class="fas fa-theater-masks"></i>'
  150. natural=tree:
  151. icon: '<i class="fas fa-tree"></i>'
  152. heritage:
  153. man_made:
  154. other:
  155. query: 'nwr[historic][historic!~"^(memorial|monument|wayside_cross|wayside_shrine|building)$"]'
  156. trans: 'other'
  157. categories:
  158. 'no':
  159. color: red
  160. text: No image, wikimedia_commons or wikidata
  161. has_image:
  162. color: cyan
  163. text: image or wikimedia_commons tag but no wikidata
  164. wikidata_no_image:
  165. color: '#007fff'
  166. text: has wikidata tag, but wikidata object does not have an image
  167. wikidata:
  168. color: blue
  169. text: has wikidata tag
  170. wikidata_human:
  171. color: magenta
  172. text: wikidata tag points to a human, should most likely be 'subject:wikidata'
  173. wikipedia_no_wikidata:
  174. color: '#af00ff'
  175. text: wikipedia tag found without corresponding wikidata tag