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.

180 lines
7.1 KiB

  1. name:
  2. ca: Cultura - Mitjans/Wikidata
  3. en: Culture - Media/Wikidata
  4. fr: Culture - Média/Wikidata
  5. hu: Kultúra – média/Wikidata
  6. it: Cultura - Immagini/Wikidata
  7. pl: Kultura - Media/Wikidane
  8. pt-br: Cultura - Imagem e Wikidata
  9. pt: Cultura - Media/Wikidata
  10. tr: Kültür - Medya/Wikidata
  11. type: "overpass"
  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. {{ tagTrans('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. {% endif %}
  69. markerSymbol: "{{ markerPointer({ fillColor: def.color })|raw }}"
  70. listMarkerSymbol: "{{ markerCircle({ fillColor: def.color })|raw }}"
  71. markerSign: |
  72. {% set icon = '' %}
  73. {% for kv, d in const.types|reverse %}
  74. {% set k = kv|split('=')[0] %}
  75. {% set v = kv|split('=')[1] %}
  76. {% if d.icon and v and attribute(tags, k) == v %}
  77. {% set icon = d.icon %}
  78. {% endif %}
  79. {% endfor %}
  80. <span style='color: white;'>{{ icon|raw }}</span>
  81. filter:
  82. type:
  83. name: "{{ trans('filter:type') }}"
  84. show_default: "true"
  85. query: "nwr[{{ value }}]"
  86. type: "select"
  87. key: "tourism"
  88. values: |
  89. {% for kv, d in const.types %}
  90. {% set k = kv|split('=')[0] %}
  91. {% set v = kv|split('=')[1] %}
  92. {% set d = d|default({}) %}
  93. <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>
  94. {% endfor %}
  95. op: "has"
  96. category:
  97. name: "{{ trans('category') }}"
  98. show_default: "true"
  99. type: "select"
  100. values: |
  101. <option value='no' query='nwr[!image][!wikimedia_commons][!wikidata][!wikipedia]'>No image, wikimedia_commons or wikidata</option>
  102. <option value='wikipedia_no_wikidata' query='nwr[!wikidata][wikipedia]'>wikipedia tag found without corresponding wikidata tag</option>
  103. <option value='has_image' query='(nwr[!wikidata][image];nwr[!wikidata][wikimedia_commons];)'>image or wikimedia_commons tag but no wikidata</option>
  104. <option value='wikidata' query='nwr[wikidata]'>has wikidata tag</option>
  105. <option value='wikidata_no_image' query='nwr[wikidata]'>has wikidata tag, but wikidata object does not have an image</option>
  106. <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>
  107. <option value='wikidata_human' query='nwr[wikidata]'>wikidata tag points to a human, should most likely be 'subject:wikidata'</option>
  108. info: |
  109. <table>
  110. {% for k, def in const.categories %}
  111. <tr>
  112. <td>
  113. {{ markerCircle({ fillColor: def.color })|raw }}
  114. </td>
  115. <td>{{ def.text }}</td>
  116. </tr>
  117. {% endfor %}
  118. </table>
  119. 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>
  120. 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>".
  121. const:
  122. types:
  123. tourism=artwork:
  124. icon: '<i class="fas fa-palette"></i>'
  125. tourism=attraction:
  126. icon: '<i class="fas fa-chess"></i>'
  127. historic=memorial:
  128. icon: '<i class="fas fa-monument"></i>'
  129. historic=monument:
  130. icon: '<i class="fas fa-monument"></i>'
  131. historic=wayside_cross:
  132. icon: '<i class="fas fa-cross"></i>'
  133. historic=wayside_shrine:
  134. icon: '<i class="fas fa-vihara"></i>'
  135. historic=building:
  136. icon: '<i class="fas fa-home"></i>'
  137. amenity=fountain:
  138. icon: '<img data-src="temaki:fountain?stroke=white">'
  139. amenity=arts_centre:
  140. icon: '<i class="fas fa-university"></i>'
  141. amenity=place_of_worship:
  142. icon: '<i class="fas fa-place-of-worship"></i>'
  143. amenity=theatre:
  144. icon: '<i class="fas fa-theater-masks"></i>'
  145. heritage:
  146. other:
  147. query: 'nwr[historic][historic!~"^(memorial|monument|wayside_cross|wayside_shrine|building)$"]'
  148. trans: 'other'
  149. categories:
  150. 'no':
  151. color: red
  152. text: No image, wikimedia_commons or wikidata
  153. has_image:
  154. color: cyan
  155. text: image or wikimedia_commons tag but no wikidata
  156. wikidata_no_image:
  157. color: '#007fff'
  158. text: has wikidata tag, but wikidata object does not have an image
  159. wikidata:
  160. color: blue
  161. text: has wikidata tag
  162. wikidata_human:
  163. color: magenta
  164. text: wikidata tag points to a human, should most likely be 'subject:wikidata'
  165. wikipedia_no_wikidata:
  166. color: '#af00ff'
  167. text: wikipedia tag found without corresponding wikidata tag