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.

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