query-b1af4fe2ac1dd580071952e034059b95
https://petscan.wmflabs.org/?psid=23847296&al_commands=P131%3AQ2442135Posar barri a partir de punt central:
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#>
# coses centrades per posar barri o municipi
SELECT ?inst ?instLabel ?item ?itemLabel ?layer ?layerLabel ?coord WHERE {
VALUES ?inst {wd:Q41176 wd:Q16917 wd:Q24354 wd:Q860861 wd:Q11707 wd:Q721747 wd:Q928830 wd:Q1107656
wd:Q3947 wd:Q12317349 wd:Q111594067 wd:Q27686 wd:Q16970 wd:Q35112127
wd:Q1273818 wd:Q41253 wd:Q111236457 wd:Q50359544 wd:Q200764 wd:Q1088552
wd:Q7075 wd:Q483453 wd:Q1007870}
?item wdt:P31 ?inst.
?item wdt:P625 ?coord.
wd:Q85692793 wdt:P625 ?centre.
FILTER(geof:distance(?coord, ?centre) < .370).
OPTIONAL {
?item wdt:P131 ?layer.
?layer wdt:P31 wd:Q75135432.
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca,en,es,fr,de" .
}
}
#defaultView:Map
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?centre")
v1("?coord"):::projected
v3("?inst"):::projected
v4("?item"):::projected
v5("?layer"):::projected
c4(["wd:Q85692793"]):::iri
c8(["bd:serviceParam"]):::iri
c6(["wd:Q75135432"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,ca,en,es,fr,de"]):::literal
f0[["http://www.opengis.net/def/function/geosparql/distance(?coord,?centre) < '.370^^xsd:decimal'"]]
f0 --> v1
f0 --> v2
bind1[/VALUES ?inst/]
bind1-->v3
bind10(["wd:Q41176"])
bind10 --> bind1
bind11(["wd:Q16917"])
bind11 --> bind1
bind12(["wd:Q24354"])
bind12 --> bind1
bind13(["wd:Q860861"])
bind13 --> bind1
bind14(["wd:Q11707"])
bind14 --> bind1
bind15(["wd:Q721747"])
bind15 --> bind1
bind16(["wd:Q928830"])
bind16 --> bind1
bind17(["wd:Q1107656"])
bind17 --> bind1
bind18(["wd:Q3947"])
bind18 --> bind1
bind19(["wd:Q12317349"])
bind19 --> bind1
bind110(["wd:Q111594067"])
bind110 --> bind1
bind111(["wd:Q27686"])
bind111 --> bind1
bind112(["wd:Q16970"])
bind112 --> bind1
bind113(["wd:Q35112127"])
bind113 --> bind1
bind114(["wd:Q1273818"])
bind114 --> bind1
bind115(["wd:Q41253"])
bind115 --> bind1
bind116(["wd:Q111236457"])
bind116 --> bind1
bind117(["wd:Q50359544"])
bind117 --> bind1
bind118(["wd:Q200764"])
bind118 --> bind1
bind119(["wd:Q1088552"])
bind119 --> bind1
bind120(["wd:Q7075"])
bind120 --> bind1
bind121(["wd:Q483453"])
bind121 --> bind1
bind122(["wd:Q1007870"])
bind122 --> bind1
v4 --"wdt:P31"--> v3
v4 --"wdt:P625"--> v1
c4 --"wdt:P625"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P131".-> v5
v5 --"wdt:P31"--> c6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end