query-dcab9f718bbb7008e8ddacbdc16aa945
Geolocated things in a box roughly defining Libya
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 p: <http://www.wikidata.org/prop/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
#defaultView:Map
SELECT ?label ?loc ?subj WHERE {
{ ?subj (wdt:P31/wdt:P279*) wd:Q839954. }
UNION
{ }
?subj wdt:P625 ?loc.
?subj (p:P625/psv:P625) ?coord.
?subj rdfs:label ?label.
?coord wikibase:geoLatitude ?lat.
?coord wikibase:geoLongitude ?long.
FILTER((LANG(?label)) = "en")
FILTER(?lat > "25.56"^^xsd:decimal)
FILTER(?lat < "33.65"^^xsd:decimal)
FILTER(?long > "8.22"^^xsd:decimal)
FILTER(?long < "18.97"^^xsd:decimal)
}
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((" "))
c8(["wd:Q839954"]):::iri
f0[["?long < '18.97^^xsd:decimal'"]]
f0 --> v1
f1[["?long > '8.22^^xsd:decimal'"]]
f1 --> v1
f2[["?lat < '33.65^^xsd:decimal'"]]
f2 --> v2
f3[["?lat > '25.56^^xsd:decimal'"]]
f3 --> v2
f4[["?label = 'en'"]]
f4 --> v3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
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"--> a2
a2 --"p:statement/value/P625"--> v6
v4 --"rdfs:label"--> v3
v6 --"wikibase:geoLatitude"--> v2
v6 --"wikibase:geoLongitude"--> v1