query-6d92de9520e4b655970ef2e3fdd0d3b7
Straßen ohne Bild aber mit Commons-Kategorie
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#>
SELECT DISTINCT ?item ?itemLabel ?image ?commonscat_link ?coordinates
WHERE {
?item wdt:P8138 wd:Q9004530.
VALUES ?instance_of {
wd:Q34442 # Straße
wd:Q79007 # Innerortstraße
wd:Q21000333 # Einkaufsstraße
wd:Q174782 # Platz
wd:Q537127 # Straßenbrücke
wd:Q3397519 # Spannbetonbrücke
wd:Q1055465 # Balkenbrücke
wd:Q57577442 # Feldweg
wd:Q207934 # Allee
wd:Q628179 # Weg
wd:Q5004679 # Weg
wd:Q221722 # Radweg
wd:Q787113 # Promenade
}
?item wdt:P31 ?instance_of;
wdt:P373 ?commonscat;
wdt:P625 ?coordinates.
OPTIONAL {?item wdt:P18 ?image}
FILTER(!BOUND(?image))
BIND(IRI(CONCAT("https://commons.wikimedia.org/wiki/Category:", ?commonscat)) AS ?commonscat_link) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de,en". }
}
ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?commonscat")
v7("?commonscat_link"):::projected
v6("?coordinates"):::projected
v2("?image"):::projected
v4("?instance_of")
v3("?item"):::projected
v1("?itemLabel"):::projected
c2(["wd:Q9004530"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,de,en"]):::literal
f0[["not bound(?image)"]]
f0 --> v2
v3 --"wdt:P8138"--> c2
bind1[/VALUES ?instance_of/]
bind1-->v4
bind10(["wd:Q34442"])
bind10 --> bind1
bind11(["wd:Q79007"])
bind11 --> bind1
bind12(["wd:Q21000333"])
bind12 --> bind1
bind13(["wd:Q174782"])
bind13 --> bind1
bind14(["wd:Q537127"])
bind14 --> bind1
bind15(["wd:Q3397519"])
bind15 --> bind1
bind16(["wd:Q1055465"])
bind16 --> bind1
bind17(["wd:Q57577442"])
bind17 --> bind1
bind18(["wd:Q207934"])
bind18 --> bind1
bind19(["wd:Q628179"])
bind19 --> bind1
bind110(["wd:Q5004679"])
bind110 --> bind1
bind111(["wd:Q221722"])
bind111 --> bind1
bind112(["wd:Q787113"])
bind112 --> bind1
v3 --"wdt:P31"--> v4
v3 --"wdt:P373"--> v5
v3 --"wdt:P625"--> v6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P18".-> v2
end
bind2[/"concat('https://commons.wikimedia.org/wiki/Category:',?commonscat)"/]
v5 --o bind2
bind2 --as--o v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end