query-fc7181c59a6e95e2d0fb7d9bbbb61b6d
Wikidata-Wikipedia-Koordinatensuche im Umkreis um Wikidata-Objekt
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?place ?placeLabel ?placeDescription ?location ?dist ?article ?Bild ?is_aLabel WHERE
{
wd:Q502668 wdt:P625 ?arcLoc . # Wikidata-Objekt zur Umkreissuche, z.B. Rosenbach
SERVICE wikibase:around {
?place wdt:P625 ?location .
bd:serviceParam wikibase:center ?arcLoc .
bd:serviceParam wikibase:radius "30" . # Entfernungsangabe in km
bd:serviceParam wikibase:distance ?dist .
}
SERVICE wikibase:label {bd:serviceParam wikibase:language "de" .}
# FILTER EXISTS { ?place wdt:P31/wdt:P279* wd:Q3947 } optional falls z.B. nur Häuser gewünscht sind
OPTIONAL { ?article schema:about ?place; schema:isPartOf <https://de.wikipedia.org/> . }
OPTIONAL { ?place wdt:P18 ?Bild . }
OPTIONAL { ?place wdt:P31 ?is_a . }
} ORDER BY ASC(?dist)
# LIMIT 1000 beim Testen
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?Bild"):::projected
v2("?arcLoc")
v5("?article"):::projected
v1("?dist"):::projected
v7("?is_a")
v4("?location"):::projected
v3("?place"):::projected
c14([https://de.wikipedia.org/]):::iri
c11(["de"]):::literal
c1(["wd:Q502668"]):::iri
c4(["bd:serviceParam"]):::iri
c7(["30"]):::literal
c1 --"wdt:P625"--> v2
subgraph s1["http://wikiba.se/ontology#around"]
style s1 stroke-width:4px;
v3 --"wdt:P625"--> v4
c4 --"wikibase:center"--> v2
c4 --"wikibase:radius"--> c7
c4 --"wikibase:distance"--> v1
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c4 --"wikibase:language"--> c11
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."schema:about".-> v3
v5 --"schema:isPartOf"--> c14
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P18".-> v6
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P31".-> v7
end