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.

135 lines
4.7 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.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. filter:
  54. type:
  55. name: "{{ trans('filter:type') }}"
  56. show_default: "true"
  57. query: "nwr[{{ value }}]"
  58. type: "select"
  59. key: "tourism"
  60. values: |
  61. {% for kv, d in const.types %}
  62. {% set k = kv|split('=')[0] %}
  63. {% set v = kv|split('=')[1] %}
  64. {% set d = d|default({}) %}
  65. <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>
  66. {% endfor %}
  67. op: "has"
  68. info: |
  69. <table>
  70. <tr>
  71. <td>
  72. {{ markerCircle({ fillColor: 'red' })|raw }}
  73. </td>
  74. <td>No image, wikimedia_commons or wikidata</td>
  75. </tr>
  76. <tr>
  77. <td>
  78. {{ markerCircle({ fillColor: 'magenta' })|raw }}
  79. </td>
  80. <td>wikidata tag points to a human, should most likely be 'subject:wikidata'</td>
  81. </tr>
  82. <tr>
  83. <td>
  84. {{ markerCircle({ fillColor: '#af00ff' })|raw }}
  85. </td>
  86. <td>wikipedia tag found without corresponding wikidata tag</td>
  87. </tr>
  88. <tr>
  89. <td>
  90. {{ markerCircle({ fillColor: 'cyan' })|raw }}
  91. </td>
  92. <td>image or wikimedia_commons tag but no wikidata</td>
  93. </tr>
  94. <tr>
  95. <td>
  96. {{ markerCircle({ fillColor: '#007fff' })|raw }}
  97. </td>
  98. <td>has wikidata tag, but wikidata object does not have an image</td>
  99. </tr>
  100. <tr>
  101. <td>
  102. {{ markerCircle({ fillColor: 'blue' })|raw }}
  103. </td>
  104. <td>has wikidata tag</td>
  105. </tr>
  106. </table>
  107. 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>
  108. 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>".
  109. const:
  110. types:
  111. tourism=artwork:
  112. tourism=attraction:
  113. historic=memorial:
  114. historic=monument:
  115. historic=wayside_cross:
  116. historic=wayside_shrine:
  117. historic=building:
  118. amenity=fountain:
  119. amenity=arts_centre:
  120. amenity=place_of_worship:
  121. amenity=theatre:
  122. heritage:
  123. other:
  124. query: 'nwr[historic][historic!~"^(memorial|monument|wayside_cross|wayside_shrine|building)$"]'
  125. trans: 'other'