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.

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