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.

159 lines
5.6 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. body: |
  34. {{ str }}
  35. style:
  36. color: |
  37. {{ color }}
  38. description: |
  39. {% if tags.historic and tags.historic != 'yes' %}
  40. {{ tagTransList('historic', tags.historic) }}
  41. {% if tags.historic == 'memorial' and tags.memorial %}
  42. ({{ tagTransList('memorial', tags.memorial) }})
  43. {% endif %}
  44. {% elseif tags.tourism %}
  45. {{ tagTransList('tourism', tags.tourism) }}
  46. {% elseif tags.amenity %}
  47. {{ tagTrans('amenity', tags.amenity) }}
  48. {% elseif tags.building %}
  49. {{ tags.building == 'yes' ? keyTrans('building') : tagTrans('building', tags.building) }}
  50. {% elseif tags.heritage %}
  51. {{ keyTrans('heritage') }}
  52. {% endif %}
  53. markerSymbol: "{{ markerPointer({ fillColor: color })|raw }}"
  54. listMarkerSymbol: "{{ markerCircle({ fillColor: color })|raw }}"
  55. markerSign: |
  56. {% set icon = '' %}
  57. {% for kv, d in const.types|reverse %}
  58. {% set k = kv|split('=')[0] %}
  59. {% set v = kv|split('=')[1] %}
  60. {% if d.icon and v and attribute(tags, k) == v %}
  61. {% set icon = d.icon %}
  62. {% endif %}
  63. {% endfor %}
  64. <span style='color: white;'>{{ icon|raw }}</span>
  65. filter:
  66. type:
  67. name: "{{ trans('filter:type') }}"
  68. show_default: "true"
  69. query: "nwr[{{ value }}]"
  70. type: "select"
  71. key: "tourism"
  72. values: |
  73. {% for kv, d in const.types %}
  74. {% set k = kv|split('=')[0] %}
  75. {% set v = kv|split('=')[1] %}
  76. {% set d = d|default({}) %}
  77. <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>
  78. {% endfor %}
  79. op: "has"
  80. info: |
  81. <table>
  82. <tr>
  83. <td>
  84. {{ markerCircle({ fillColor: 'red' })|raw }}
  85. </td>
  86. <td>No image, wikimedia_commons or wikidata</td>
  87. </tr>
  88. <tr>
  89. <td>
  90. {{ markerCircle({ fillColor: 'magenta' })|raw }}
  91. </td>
  92. <td>wikidata tag points to a human, should most likely be 'subject:wikidata'</td>
  93. </tr>
  94. <tr>
  95. <td>
  96. {{ markerCircle({ fillColor: '#af00ff' })|raw }}
  97. </td>
  98. <td>wikipedia tag found without corresponding wikidata tag</td>
  99. </tr>
  100. <tr>
  101. <td>
  102. {{ markerCircle({ fillColor: 'cyan' })|raw }}
  103. </td>
  104. <td>image or wikimedia_commons tag but no wikidata</td>
  105. </tr>
  106. <tr>
  107. <td>
  108. {{ markerCircle({ fillColor: '#007fff' })|raw }}
  109. </td>
  110. <td>has wikidata tag, but wikidata object does not have an image</td>
  111. </tr>
  112. <tr>
  113. <td>
  114. {{ markerCircle({ fillColor: 'blue' })|raw }}
  115. </td>
  116. <td>has wikidata tag</td>
  117. </tr>
  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'