query-a8a25c3013581f3ce63268f5ac860a0b
Stone circle positions across UK
Use at
- https://query.wikidata.org/sparql
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 (?typeLabel AS ?layer) ?label ?loc ?subj
WHERE
{
?subj wdt:P31/wdt:P279* wd:Q1935728 ; # site or subtype
wdt:P625 ?loc ; # location to plot on map
p:P625/psv:P625 ?coord; # coordinate-location statement
rdfs:label ?label filter (lang(?label) = "en"). #Place name
?type wdt:P279? wd:Q8818437 ;
rdfs:label ?typeLabel filter (lang(?typeLabel) = "en"). #Type of fort (Q744099)
?coord wikibase:geoLatitude ?lat .
?coord wikibase:geoLongitude ?long .
FILTER (?lat > 50.103) FILTER (?lat < 60.154)
FILTER (?long > -7.64) FILTER (?long < 1.75)
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?coord")
v4("?label"):::projected
v2("?lat")
v9("?layer")
v6("?loc"):::projected
v1("?long")
v5("?subj"):::projected
v8("?type")
v3("?typeLabel"):::projected
a1((" "))
a2((" "))
c13(["wd:Q8818437"]):::iri
c8(["wd:Q1935728"]):::iri
f0[["?long < '1.75^^xsd:decimal'"]]
f0 --> v1
f1[["?long > '-7.64^^xsd:decimal'"]]
f1 --> v1
f2[["?lat < '60.154^^xsd:decimal'"]]
f2 --> v2
f3[["?lat > '50.103^^xsd:decimal'"]]
f3 --> v2
f4[["?typeLabel = 'en'"]]
f4 --> v3
f5[["?label = 'en'"]]
f5 --> v4
v5 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c8
v5 --"p:direct/P625"--> v6
v5 --"p:P625"--> a2
a2 --"p:statement/value/P625"--> v7
v5 --"rdfs:label"--> v4
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v8 --"p:direct/P279"--> c13
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
end
union0r <== or ==> union0l
end
v8 --"rdfs:label"--> v3
v7 --"wikibase:geoLatitude"--> v2
v7 --"wikibase:geoLongitude"--> v1
bind6[/"?typeLabel"/]
v3 --o bind6
bind6 --as--o v9