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.

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