query-d98a1c9976aaa13725e7f67fed783963
Distance query not finding itself the same? I'm completely baffled. (P625)coordinate location Can anyone explain why this query returns itself for Dover Castle, but not for Hack Green bunker, when both have
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 bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "en-GB,en,fr,de,es,pt,pl,nl,cs". }
{
SELECT DISTINCT ?item
WHERE {
# hint:Query hint:optimizer "None"
wd:Q5637175 wdt:P625 ?targetLoc. # hack green bunker
#wd:Q950970 wdt:P625 ?targetLoc. # dover castle
SERVICE wikibase:around{
?item wdt:P625 ?location.
bd:serviceParam wikibase:center ?targetLoc.
bd:serviceParam wikibase:radius "0.1".
bd:serviceParam wikibase:distance ?dist.
}
}
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?dist")
v2("?item"):::projected
v3("?location")
v1("?targetLoc")
c4(["en-GB,en,fr,de,es,pt,pl,nl,cs"]):::literal
c5(["wd:Q5637175"]):::iri
c2(["bd:serviceParam"]):::iri
c10(["0.1"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
c5 --"wdt:P625"--> v1
subgraph s2["http://wikiba.se/ontology#around"]
style s2 stroke-width:4px;
v2 --"wdt:P625"--> v3
c2 --"wikibase:center"--> v1
c2 --"wikibase:radius"--> c10
c2 --"wikibase:distance"--> v4
end