type: "overpass" query: 15: | ( nwr[historic]; nwr[tourism~'^(attraction|artwork)$']; nwr[heritage]; nwr[amenity~'^(fountain|arts_centre|place_of_worship|theatre)$']; ) feature: pre: | {% set cat = 'no' %} {% set str = null %} {% if tags.wikidata %} {% set cat = 'wikidata' %} {% set wikidata = tags.wikidata|wikidataEntity %} {% if wikidata and wikidata.claims.P18|length == 0 %} {% set cat = 'wikidata_no_image' %} {% endif %} {% if wikidata.claims.P31[0].mainsnak.datavalue.value.id in ['Q5'] %} {% set cat = 'wikidata_human' %} {% endif %} {% elseif tags.wikipedia %} {% set cat = 'wikipedia_no_wikidata' %} {% elseif tags.wikimedia_commons or tags.image %} {% set cat = 'has_image' %} {% set str = tags.wikimedia_commons ? 'has wikimedia_commons tag' : 'has image tag' %} {% endif %} {% set def = const.categories[cat] %} exclude: | {% if filter.category == 'wikidata_no_image' %} {{ (not wikidata) or (wikidata.claims.P18|length != 0) }} {% elseif filter.category == 'no_image_or_wikidata_no_image' %} {{ (tags.wikidata and not wikidata) or (wikidata.claims.P18|length != 0) }} {% elseif filter.category == 'wikidata_human' %} {{ wikidata.claims.P31[0].mainsnak.datavalue.value.id not in ['Q5'] }} {% endif %} body: | {{ str|default(def.text) }} style: color: | {{ def.color }} description: | {% if tags.historic and tags.historic != 'yes' %} {{ tagTransList('historic', tags.historic) }} {% if tags.historic == 'memorial' and tags.memorial %} ({{ tagTransList('memorial', tags.memorial) }}) {% endif %} {% elseif tags.tourism %} {{ tagTransList('tourism', tags.tourism) }} {% elseif tags.amenity %} {{ tagTrans('amenity', tags.amenity) }} {% elseif tags.building %} {{ tags.building == 'yes' ? keyTrans('building') : tagTrans('building', tags.building) }} {% elseif tags.heritage %} {{ keyTrans('heritage') }} {% endif %} markerSymbol: "{{ markerPointer({ fillColor: def.color })|raw }}" listMarkerSymbol: "{{ markerCircle({ fillColor: def.color })|raw }}" markerSign: | {% set icon = '' %} {% for kv, d in const.types|reverse %} {% set k = kv|split('=')[0] %} {% set v = kv|split('=')[1] %} {% if d.icon and v and attribute(tags, k) == v %} {% set icon = d.icon %} {% endif %} {% endfor %} {{ icon|raw }} filter: type: name: "{{ trans('filter:type') }}" show_default: "true" query: "nwr[{{ value }}]" type: "select" key: "tourism" values: | {% for kv, d in const.types %} {% set k = kv|split('=')[0] %} {% set v = kv|split('=')[1] %} {% set d = d|default({}) %} {% endfor %} op: "has" category: name: "{{ trans('category') }}" show_default: "true" type: "select" values: | info: | {% for k, def in const.categories %} {% endfor %}
{{ markerCircle({ fillColor: def.color })|raw }} {{ def.text }}
This category lists artwork, memorials, historic and heritage protected objects. These should have an image or wikimedia_commons tag, or (even better) a wikidata tag pointing to the object's entry.
Memorials erroneously often have a wikidata (and wikipedia) tag of the person/event, which should be changed to subject:wikidata resp. subject:wikipedia". const: types: tourism=artwork: icon: '' tourism=attraction: icon: '' historic=memorial: icon: '' historic=monument: icon: '' historic=wayside_cross: icon: '' historic=wayside_shrine: icon: '' historic=building: icon: '' amenity=fountain: icon: '' amenity=arts_centre: icon: '' amenity=place_of_worship: icon: '' amenity=theatre: icon: '' heritage: other: query: 'nwr[historic][historic!~"^(memorial|monument|wayside_cross|wayside_shrine|building)$"]' trans: 'other' categories: 'no': color: red text: No image, wikimedia_commons or wikidata has_image: color: cyan text: image or wikimedia_commons tag but no wikidata wikidata_no_image: color: '#007fff' text: has wikidata tag, but wikidata object does not have an image wikidata: color: blue text: has wikidata tag wikidata_human: color: magenta text: wikidata tag points to a human, should most likely be 'subject:wikidata' wikipedia_no_wikidata: color: '#af00ff' text: wikipedia tag found without corresponding wikidata tag