query-f99d074629cd2d13a1bc8745cce66a49

rq turtle/ttl

Hillforts without an image

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
#defaultView:Map
SELECT ?label (SAMPLE(?coord) AS ?where) ?subj (?typeLabel AS ?layer) WHERE
{  ?subj wdt:P31/wdt:P279? ?type ;
      wdt:P625 ?coord ;
      wdt:P31 ?type ;
      rdfs:label ?label filter (lang(?label) = "en").
?type wdt:P279? wd:Q744099 ;
    rdfs:label ?typeLabel filter (lang(?typeLabel) = "en").
MINUS{?subj wdt:P18 []}
?subj p:P625/psv:P625 ?loc. # coordinate-location statement
  ?loc wikibase:geoLatitude ?lat .
  ?loc wikibase:geoLongitude ?long .
   FILTER (?lat > 49) FILTER (?lat < 63)
   FILTER (?long > -10.5) FILTER (?long < 2.02) 
} GROUP BY ?label ?subj ?typeLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?coord"):::projected v4("?label"):::projected v2("?lat") v10("?layer") v8("?loc") v1("?long") v5("?subj"):::projected v6("?type") v3("?typeLabel"):::projected v9("?where") a2((" ")) a1((" ")) a3((" ")) c10(["wd:Q744099"]):::iri f0[["?long < '2.02^^xsd:decimal'"]] f0 --> v1 f1[["?long > '-10.5^^xsd:decimal'"]] f1 --> v1 f2[["?lat < '63^^xsd:integer'"]] f2 --> v2 f3[["?lat > '49^^xsd:integer'"]] f3 --> v2 f4[["?typeLabel = 'en'"]] f4 --> v3 f5[["?label = 'en'"]] f5 --> v4 v5 --"p:direct/P31"--> a1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; a1 --"p:direct/P279"--> v6 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; end union0r <== or ==> union0l end v5 --"p:direct/P625"--> v7 v5 --"p:direct/P31"--> v6 v5 --"rdfs:label"--> v4 subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v6 --"p:direct/P279"--> c10 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; end union1r <== or ==> union1l end v6 --"rdfs:label"--> v3 subgraph minus6["MINUS"] style minus6 stroke-width:6px,fill:pink,stroke:red; v5 --"p:direct/P18"--> a2 end v5 --"p:P625"--> a3 a3 --"p:statement/value/P625"--> v8 v8 --"wikibase:geoLatitude"--> v2 v8 --"wikibase:geoLongitude"--> v1 bind8[/"sample(?coord)"/] v7 --o bind8 bind8 --as--o v9 bind9[/"?typeLabel"/] v3 --o bind9 bind9 --as--o v10