query-be6756ef1c9cc424f06e241cbd85ce6a
Map of churches in Livorno
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 bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
# Select the ItemId, label and coordinate location
SELECT ?place ?placeLabel ?location WHERE {
# Select the coordinate location(P625) of Livorno(Q6761) as the centeral coordinate ?mainLoc
wd:Q6761 wdt:P625 ?mainLoc .
# Use the around service
SERVICE wikibase:around {
# Looking for items with coordinate locations(P625)
?place wdt:P625 ?location .
# That are in a circle with a centre of ?mainLoc(The coordinate location of Berlin)
bd:serviceParam wikibase:center ?mainLoc .
# Where the circle has a radius of 10km
bd:serviceParam wikibase:radius "10" .
}
# Use the label service to get the English label
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
?place wdt:P31*/wdt:P279* wd:Q16970 . # Instance of churches
}
LIMIT 200
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?location"):::projected
v1("?mainLoc")
v2("?place"):::projected
a1((" "))
c10(["en"]):::literal
c4(["bd:serviceParam"]):::iri
c1(["wd:Q6761"]):::iri
c13(["wd:Q16970"]):::iri
c7(["10"]):::literal
c1 --"wdt:P625"--> v1
subgraph s1["http://wikiba.se/ontology#around"]
style s1 stroke-width:4px;
v2 --"wdt:P625"--> v3
c4 --"wikibase:center"--> v1
c4 --"wikibase:radius"--> c7
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c4 --"wikibase:language"--> c10
end
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c13