query-bfbd2515cfbe60a046d06f065c592ab4
Layers by propertyI am still struggling with layers. All I want is one color for coordinates from ?pob and second color for coordinates from ?pod.
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 .}
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")
v3("?pob")
v4("?pod")
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 s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end