query-77b2f2d8b5fe34865aa7a45ab537057c
TODO
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#>
#defaultView:Map
SELECT ?sign ?signLabel ?pobLabel ?podLabel ?coorb ?coord ?layer WHERE {
VALUES ?item { wd:Q66486391 }
?item wdt:P1891 ?sign.
?sign wdt:P19 ?pob .
?sign wdt:P20 ?pod .
{?pob wdt:P625 ?coord .} union {?pod wdt:P625 ?coord .}
optional {?pob wdt:P625 ?pobcoord .}
optional {?pod wdt:P625 ?podcoord .}
bind(if(?coord = ?pobcoord && ?coord = ?podcoord, "pob & pod",if(?coord = ?pobcoord,"pob","pod")) as ?layer)
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;
v5("?coord"):::projected
v1("?item")
v8("?layer"):::projected
v3("?pob")
v6("?pobcoord")
v4("?pod")
v7("?podcoord")
v2("?sign"):::projected
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?item/]
bind0-->v1
bind00(["wd:Q66486391"])
bind00 --> bind0
v1 --"wdt:P1891"--> v2
v2 --"wdt:P19"--> v3
v2 --"wdt:P20"--> v4
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P625"--> v5
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P625"--> v5
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P625".-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P625".-> v7
end
bind1[/"if(?coord = ?pobcoord?coord = ?podcoord,'pob & pod',if(?coord = ?pobcoord,'pob','pod'))"/]
v5 --o bind1
v6 --o bind1
v7 --o bind1
bind1 --as--o v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end