query-a31c113a82d0b328e5aa2de89cfb93aa
TODO
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 geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Mappa di ospedali nel raggio di 50 km da Pavia
#defaultView:Map
SELECT distinct ?item ?itemLabel ?location WHERE {
wd:Q6259 wdt:P625 ?coordPv . # coordinates of Pavia
?item wdt:P31/wdt:P279* wd:Q16917; # item is a hospital
wdt:P625 ?location .
FILTER(geof:distance(?location, ?coordPv) < 50). # less than 50 km away from Pavia
SERVICE wikibase:label { bd:serviceParam wikibase:language "it, en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?coordPv")
v3("?item"):::projected
v1("?location"):::projected
a1((" "))
c8(["bd:serviceParam"]):::iri
c6(["wd:Q16917"]):::iri
c2(["wd:Q6259"]):::iri
c10(["it, en"]):::literal
f0[["http://www.opengis.net/def/function/geosparql/distance(?location,?coordPv) < '50^^xsd:integer'"]]
f0 --> v1
f0 --> v2
c2 --"wdt:P625"--> v2
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c6
v3 --"wdt:P625"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end