query-7712168ac9827f0db597cb3b24b1adc1
Archaeological sites with lat-long pairs placing them in Sicily
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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT ?place ?placeLabel ?latlong (SAMPLE(?image) as ?image)
WHERE
{ ?place wdt:P31/wdt:P279* wd:Q839954; # Archaeological site (or type of)
wdt:P625 ?latlong;
p:P625 ?statement . # coordinate-location statement
OPTIONAL {?place wdt:P18 ?image }.
?statement psv:P625 ?coord.
?coord wikibase:geoLatitude ?lat .
?coord wikibase:geoLongitude ?long .
FILTER (ABS(?lat - 37.5) < 1.3).
FILTER (ABS(?long - 14) < 1.5).
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en,it" }
} GROUP BY ?place ?placeLabel ?latlong
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?coord")
v8("?image"):::projected
v2("?lat")
v4("?latlong"):::projected
v1("?long")
v3("?place"):::projected
v5("?statement")
a1((" "))
c7(["wd:Q839954"]):::iri
c15(["bd:serviceParam"]):::iri
c17(["#91;AUTO_LANGUAGE#93;,mul,en,it"]):::literal
f0[["numeric-abs(?long - '14^^xsd:integer') < '1.5^^xsd:decimal'"]]
f0 --> v1
f1[["numeric-abs(?lat - '37.5^^xsd:decimal') < '1.3^^xsd:decimal'"]]
f1 --> v2
v3 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c7
v3 --"p:direct/P625"--> v4
v3 --"p:P625"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P18".-> v8
end
v5 --"p:statement/value/P625"--> v7
v7 --"wikibase:geoLatitude"--> v2
v7 --"wikibase:geoLongitude"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
end
bind3[/"sample(?image)"/]
v8 --o bind3
bind3 --as--o v8