query-7b68412550cef3eeee54f3e64a47e75b

rq turtle/ttl

Fortifications within 20km from Dover Castle

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?place ?placeLabel ?placeDescription ?location WHERE {
  wd:Q950970 wdt:P625 ?targetLoc . 
  SERVICE wikibase:around { 
      ?place wdt:P625 ?location . 
      bd:serviceParam wikibase:center ?targetLoc . 
      bd:serviceParam wikibase:radius "20" . 
      bd:serviceParam wikibase:distance ?dist.
  } 
  # Is a fortification but not a hillfort
  FILTER EXISTS { ?place wdt:P31/wdt:P279* wd:Q57821.
    MINUS {
      ?place wdt:P31/wdt:P279* wd:Q744099.
    }
  }
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en-gb,en,mul" . 
  }
} ORDER BY ASC(?dist)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?dist") v4("?location"):::projected v2("?place"):::projected v3("?targetLoc") a1((" ")) a2((" ")) c15(["en-gb,en,mul"]):::literal c4(["wd:Q744099"]):::iri c5(["wd:Q950970"]):::iri c8(["bd:serviceParam"]):::iri c3(["wd:Q57821"]):::iri c11(["20"]):::literal f0[[" "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P31"--> e0a1 e0a1 --"wdt:P279"--> e0c3 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; e0v1 --"wdt:P31"--> e0a2 e0a2 --"wdt:P279"--> e0c4 end e0v1("?place"):::projected e0a1((" ")):::projected e0a2((" ")):::projected e0c4(["wd:Q744099"]):::iri e0c3(["wd:Q57821"]):::iri end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> a1 f0 --> c2 f0 --> c3 f0 --> a2 f0 --> c4 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v2 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c4 end c5 --"wdt:P625"--> v3 subgraph s1["http://wikiba.se/ontology#around"] style s1 stroke-width:4px; v2 --"wdt:P625"--> v4 c8 --"wikibase:center"--> v3 c8 --"wikibase:radius"--> c11 c8 --"wikibase:distance"--> v1 end subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c8 --"wikibase:language"--> c15 end