query-16c8d51e825ee3ca8444397e3d9372f7

rq turtle/ttl

Cultural heritage sites

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# All items that have p1587 set and some other optional information. Also works as a map
#defaultView:Map
SELECT ?item ?itemLabel ?ESD ?coord ?image ?layer
WHERE
{
    ?item wdt:P1587 ?ESD .
    OPTIONAL { ?item wdt:P625 ?coord }
    OPTIONAL { ?item wdt:P18 ?image }
    OPTIONAL { ?item wdt:P1435 ?type }
    SERVICE wikibase:label { 
      bd:serviceParam wikibase:language "en" .
      ?item rdfs:label ?itemLabel .
      ?type rdfs:label ?layer .
    }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?ESD"):::projected v3("?coord"):::projected v4("?image"):::projected v1("?item"):::projected v6("?itemLabel"):::projected v7("?layer"):::projected v5("?type") c6(["bd:serviceParam"]):::iri c8(["en"]):::literal v1 --"wdt:P1587"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P625".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P18".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1435".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 v1 --"rdfs:label"--> v6 v5 --"rdfs:label"--> v7 end