query-7a8ed93a18db05e3d96cf76fba7d567d

rq turtle/ttl

Archaeological sites and fortifications of all kinds in a lat/long box placing them in the Isle of Man

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 ?loc ?subj
WHERE
{
   { ?subj wdt:P31/wdt:P279* wd:Q839954 } UNION { ?subj wdt:P31/wdt:P279* wd:Q57821 } # site or subtype / hillfort or subtype
   ?subj   wdt:P625 ?loc ; # location to plot on map
          p:P625/psv:P625 ?coord; # coordinate-location statement
      rdfs:label ?label filter (lang(?label) = "en").
  ?coord wikibase:geoLatitude ?lat .
  ?coord wikibase:geoLongitude ?long .
   FILTER (?lat > 53.845) FILTER (?lat < 54.554)
   FILTER (?long > -5.17) FILTER (?long < -3.96) 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?coord") v3("?label"):::projected v2("?lat") v5("?loc"):::projected v1("?long") v4("?subj"):::projected a1((" ")) a2((" ")) a3((" ")) c8(["wd:Q839954"]):::iri c9(["wd:Q57821"]):::iri f0[["?long < '-3.96^^xsd:decimal'"]] f0 --> v1 f1[["?long > '-5.17^^xsd:decimal'"]] f1 --> v1 f2[["?lat < '54.554^^xsd:decimal'"]] f2 --> v2 f3[["?lat > '53.845^^xsd:decimal'"]] f3 --> v2 f4[["?label = 'en'"]] f4 --> v3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v4 --"p:direct/P31"--> a2 a2 --"p:direct/P279"--> c9 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v4 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c8 end union0r <== or ==> union0l end v4 --"p:direct/P625"--> v5 v4 --"p:P625"--> a3 a3 --"p:statement/value/P625"--> v6 v4 --"rdfs:label"--> v3 v6 --"wikibase:geoLatitude"--> v2 v6 --"wikibase:geoLongitude"--> v1