query-564ab85852964fb3078a8ec06c274ead
https://petscan.wmflabs.org/?psid=23869488&al_commands=P131%3AQ377070Posar coses del barrri amb el·lipse: Per copiar a PetScan, \u002b en comptes de +.
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 en una el·lipse per posar barri o municipi (però no va al petscan)
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:Q99509385 wdt:P625 ?focus1.
wd:Q113663833 wdt:P625 ?focus2.
BIND (geof:distance(?coord, ?focus1)+geof:distance(?coord, ?focus2) as ?d).
FILTER(?d < 2.54).
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;
v4("?coord"):::projected
v7("?d")
v5("?focus1")
v6("?focus2")
v2("?inst"):::projected
v3("?item"):::projected
v7("?layer"):::projected
c9(["bd:serviceParam"]):::iri
c7(["wd:Q75135432"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,ca,en,es,fr,de"]):::literal
c4(["wd:Q99509385"]):::iri
c5(["wd:Q113663833"]):::iri
f0[["?d < '2.54^^xsd:decimal'"]]
f0 --> v7
bind1[/VALUES ?inst/]
bind1-->v2
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
v3 --"wdt:P31"--> v2
v3 --"wdt:P625"--> v4
c4 --"wdt:P625"--> v5
c5 --"wdt:P625"--> v6
bind2[/"http://www.opengis.net/def/function/geosparql/distance(?coord,?focus1) + http://www.opengis.net/def/function/geosparql/distance(?coord,?focus2)"/]
v4 --o bind2
v5 --o bind2
v6 --o bind2
bind2 --as--o v7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P131".-> v7
v7 --"wdt:P31"--> c7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end