query-b8577f234bad86145c9f232a6c9fd5de
Propertiescoordinate location (P625)instance of (P31)located in the administrative territorial entity (P131)OpenStreetMap way ID (P10689)OpenStreetMap node ID (P11693)location (P276)
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 geo: <http://www.opengis.net/ont/geosparql#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?place ?dist ?placeLabel ?placeDescription ?istEinLabel ?liegtInLabel ?ortLabel ?OsmLi ?OsmKn
WHERE
{
# Nearby ohne Stolpersteine, Straßen und Sonderausstellungen
wd:Q2204038 wdt:P625 ?loc . # irgendein Item mit Geokoordinaten
#BIND ( "Point(-79.71 15.8)"^^geo:wktLiteral AS ?loc ) . # Beliebige Position. Erst Ost/West. keine Blanks vor oder nach den Koordinaten!
SERVICE wikibase:around {
?place wdt:P625 ?location .
bd:serviceParam wikibase:center ?loc .
bd:serviceParam wikibase:radius "5" .
}
OPTIONAL { ?place wdt:P31 ?istEin }
OPTIONAL { ?place wdt:P131 ?liegtIn }
OPTIONAL { ?place wdt:P10689 ?OsmLi }
OPTIONAL { ?place wdt:P11693 ?OsmKn }
OPTIONAL { ?place wdt:P276 ?ort }
FILTER ( ?istEin != wd:Q26703203 && ?istEin != wd:Q29023906 && ?istEin != wd:Q79007 )
SERVICE wikibase:label { bd:serviceParam wikibase:language "de" }
BIND(geof:distance(?loc, ?location) as ?dist)
} ORDER BY ?dist
LIMIT 50
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?OsmKn"):::projected
v7("?OsmLi"):::projected
v10("?dist"):::projected
v2("?istEin")
v6("?liegtIn")
v3("?loc")
v5("?location")
v9("?ort")
v4("?place"):::projected
c18(["de"]):::literal
c7(["bd:serviceParam"]):::iri
c10(["5"]):::literal
c4(["wd:Q2204038"]):::iri
f0[["?istEin != 'wd:Q26703203'?istEin != 'wd:Q29023906'?istEin != 'wd:Q79007'"]]
f0 --> v2
c4 --"wdt:P625"--> v3
subgraph s1["http://wikiba.se/ontology#around"]
style s1 stroke-width:4px;
v4 --"wdt:P625"--> v5
c7 --"wikibase:center"--> v3
c7 --"wikibase:radius"--> c10
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:P10689".-> v7
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P11693".-> v8
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P276".-> v9
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c7 --"wikibase:language"--> c18
end
bind1[/"http://www.opengis.net/def/function/geosparql/distance(?loc,?location)"/]
v3 --o bind1
v5 --o bind1
bind1 --as--o v10