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