query-00d858fb51dc20eb231f048d213633fe
Lijst van items in de omgevingList of objects in a range from a certain point in latitude/longitude. Condition: every object should have a geocoordinate.
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
# Select all items in a range
SELECT ?item ?itemLabel ?itemDescription ?instanceLabel ?cityLabel ?locationLabel ?distance ?layer ?article ?geolocation WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],nl,fr,de,en,es,it,no,se,fi". }
SERVICE wikibase:around {
?item wdt:P625 ?geolocation.
bd:serviceParam wikibase:center "Point(4.180303 50.870493)"^^geo:wktLiteral;
wikibase:radius "5";
wikibase:distance ?distance.
}
?item wikibase:sitelinks ?layer.
OPTIONAL { ?item wdt:P31 ?instance. }
OPTIONAL { ?item wdt:P131 ?city. }
OPTIONAL { ?item wdt:P276 ?location. }
OPTIONAL {
?article schema:about ?item;
schema:inLanguage "nl";
schema:isPartOf <https://nl.wikipedia.org/>.
}
}
ORDER BY (?distance)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?article"):::projected
v6("?city")
v1("?distance"):::projected
v3("?geolocation"):::projected
v5("?instance")
v2("?item"):::projected
v4("?layer"):::projected
v7("?location")
c4(["#91;AUTO_LANGUAGE#93;,nl,fr,de,en,es,it,no,se,fi"]):::literal
c8([sPoint(4.180303 50.870493)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"]):::literal
c2(["bd:serviceParam"]):::iri
c10(["5"]):::literal
c20([https://nl.wikipedia.org/]):::iri
c18(["nl"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
subgraph s2["http://wikiba.se/ontology#around"]
style s2 stroke-width:4px;
v2 --"wdt:P625"--> v3
c2 --"wikibase:center"--> c8
c2 --"wikibase:radius"--> c10
c2 --"wikibase:distance"--> v1
end
v2 --"wikibase:sitelinks"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P31".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P131".-> v6
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P276".-> v7
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v8 -."schema:about".-> v2
v8 --"schema:inLanguage"--> c18
v8 --"schema:isPartOf"--> c20
end