query-d269c0d18ec347f1c49a3e2b14753bc3

rq turtle/ttl

Straßen, Plätze und Brücken in Dresden ohne "Commons-Kategorie"

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#-------------------------------------------------------------------------------
# Straßen, Plätze und Brücken in Dresden ohne "Commons-Kategorie"
#-------------------------------------------------------------------------------

PREFIX schema: <http://schema.org/>
#defaultView:Table;Map{"layer": ?named_after, "hide": ["?coordinates", "?instance_ofLabel"]}
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?article ?commons ?image ?coordinates 
WHERE {
  ?item wdt:P131 wd:Q1731.                                           # Objekt liegt in Dresden
  VALUES ?instance_of { wd:Q79007 wd:Q174782 wd:Q537127}             # Liste von Objekttypen definieren: Innerortstraße oder Platz oder Brücke
  ?item wdt:P31 ?instance_of                                         # nur Objekte mit passenden Objekttyp

  OPTIONAL {                                                         # optional: deutschsprachigen Wikipedia-Artikel anzeigen
    ?article schema:about ?item.
    ?article schema:isPartOf <https://de.wikipedia.org/>.
  }
  OPTIONAL {?item wdt:P373 ?commons.}
  FILTER(!BOUND(?commons)) #commons leer
  ?item wdt:P18 ?image.                                  # optional: Bild
  OPTIONAL { ?item wdt:P625 ?coordinates. }                          # optional: Koordinate (für Ansicht in Karte)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de". } # Sprachausgabe deutsch

  #?item rdfs:label ?streetname .                                    # Straßennamen an Variable binden
  #FILTER(REGEX(STR(?streetname), "Kon")).                           # Straßennamen filtern
}
order by ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?article"):::projected v2("?commons"):::projected v7("?coordinates"):::projected v6("?image"):::projected v4("?instance_of") v3("?item"):::projected v1("?itemLabel"):::projected c6([https://de.wikipedia.org/]):::iri c13(["de"]):::literal c11(["bd:serviceParam"]):::iri c2(["wd:Q1731"]):::iri f0[["not bound(?commons)"]] f0 --> v2 v3 --"wdt:P131"--> c2 bind1[/VALUES ?instance_of/] bind1-->v4 bind10(["wd:Q79007"]) bind10 --> bind1 bind11(["wd:Q174782"]) bind11 --> bind1 bind12(["wd:Q537127"]) bind12 --> bind1 v3 --"wdt:P31"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."schema:about".-> v3 v5 --"schema:isPartOf"--> c6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P373".-> v2 end v3 --"wdt:P18"--> v6 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P625".-> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end