query-b090aa96fd9ef63e28752e58d979e8cb
Zierbrunnen in der Umgebung eines Ortes
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#>
#defaultView:Map
SELECT ?place ?location ?placeLabel ?placeDescription ?istEinLabel ?liegtInLabel ?pic
WHERE
{
wd:Q1055 wdt:P625 ?loc . # Q1055=Hamburg, Q1715=Hannover, muss mit Geokoord. sein
SERVICE wikibase:around {
?place wdt:P625 ?location .
bd:serviceParam wikibase:center ?loc .
bd:serviceParam wikibase:radius "20" .
}
OPTIONAL { ?place wdt:P31 ?istEin }
OPTIONAL { ?place wdt:P131 ?liegtIn }
OPTIONAL { ?place wdt:P17 ?staat }
OPTIONAL { ?place wdt:P18 ?pic }
#FILTER ( ?placeLabel == "Brunnen" ) # funktioniert nicht ?!
SERVICE wikibase:label { bd:serviceParam wikibase:language "de" }
FILTER ( ?istEin = wd:Q483453 ) # Q483453 ist Zierbrunnen, Q43483 Wasserbrunnen
BIND(geof:distance(?loc, ?location) as ?dist)
} ORDER BY ?dist
LIMIT 150
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v9("?dist")
v2("?istEin")
v6("?liegtIn")
v3("?loc")
v5("?location"):::projected
v8("?pic"):::projected
v4("?place"):::projected
v7("?staat")
c15(["de"]):::literal
c5(["bd:serviceParam"]):::iri
c2(["wd:Q1055"]):::iri
c8(["20"]):::literal
f0[["?istEin = 'wd:Q483453'"]]
f0 --> v2
c2 --"wdt:P625"--> v3
subgraph s1["http://wikiba.se/ontology#around"]
style s1 stroke-width:4px;
v4 --"wdt:P625"--> v5
c5 --"wikibase:center"--> v3
c5 --"wikibase:radius"--> c8
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P31".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P131".-> v6
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P17".-> v7
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P18".-> v8
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c5 --"wikibase:language"--> c15
end
bind1[/"http://www.opengis.net/def/function/geosparql/distance(?loc,?location)"/]
v3 --o bind1
v5 --o bind1
bind1 --as--o v9