query-bc9da1137d7ee06ddcf1f1a2e3c36e22
TODO
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#>
SELECT ?place ?placeLabel ?location ?distance ?sitelink ?article WHERE {
SERVICE wikibase:around {
?place wdt:P625 ?location .
bd:serviceParam wikibase:center "Point(16.141761 49.37474 )"^^geo:wktLiteral .
bd:serviceParam wikibase:radius "100" .
bd:serviceParam wikibase:distance ?distance .
}
?place wdt:P2788 ?P2788.
optional { ?article schema:about ?place ;
schema:isPartOf <https://en.wikipedia.org/> .
?sitelink ^schema:name ?article .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?P2788")
v5("?article"):::projected
v3("?distance"):::projected
v2("?location"):::projected
v1("?place"):::projected
v6("?sitelink"):::projected
c7(["100"]):::literal
c12([https://en.wikipedia.org/]):::iri
c3(["bd:serviceParam"]):::iri
c5([sPoint(16.141761 49.37474 )^^<http://www.opengis.net/ont/geosparql#wktLiteral>"]):::literal
c16(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph s1["http://wikiba.se/ontology#around"]
style s1 stroke-width:4px;
v1 --"wdt:P625"--> v2
c3 --"wikibase:center"--> c5
c3 --"wikibase:radius"--> c7
c3 --"wikibase:distance"--> v3
end
v1 --"wdt:P2788"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."schema:about".-> v1
v5 --"schema:isPartOf"--> c12
v5 --"schema:name"--> v6
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c3 --"wikibase:language"--> c16
end