query-cb71053a49b230bd261523a94c32372c
Masjid di Sumatra Barat
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 bd: <http://www.bigdata.com/rdf#>
#added before 2016-10
#defaultView:Map
SELECT ?place ?placeLabel ?location ?instanceLabel
WHERE
{
wd:Q7253 wdt:P625 ?loc .
SERVICE wikibase:around {
?place wdt:P625 ?location .
bd:serviceParam wikibase:center ?loc .
bd:serviceParam wikibase:radius "150" .
}
OPTIONAL { ?place wdt:P31 ?instance }
FILTER (?instance = wd:Q32815)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
BIND(geof:distance(?loc, ?location) as ?dist)
} ORDER BY ?dist
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?dist")
v2("?instance")
v3("?loc")
v5("?location"):::projected
v4("?place"):::projected
c5(["bd:serviceParam"]):::iri
c2(["wd:Q7253"]):::iri
c12(["en"]):::literal
c8(["150"]):::literal
f0[["?instance = 'wd:Q32815'"]]
f0 --> v2
c2 --"wdt:P625"--> v3
subgraph s1["http://wikiba.se/ontology#around"]
style s1 stroke-width:4px;
v4 --"wdt:P625"--> v5
c5 --"wikibase:center"--> v3
c5 --"wikibase:radius"--> c8
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P31".-> v2
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c5 --"wikibase:language"--> c12
end
bind1[/"http://www.opengis.net/def/function/geosparql/distance(?loc,?location)"/]
v3 --o bind1
v5 --o bind1
bind1 --as--o v6