query-78f30d247dbea7318708e32d06066f19

rq turtle/ttl

Straßen, Plätze und Brücken ohne "benannt nach"

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 "benannt nach"
#-------------------------------------------------------------------------------

PREFIX schema: <http://schema.org/>
#defaultView:Table;Map{"layer": ?named_after, "hide": ["?coordinates", "?instance_ofLabel"]}
SELECT DISTINCT ?item ?itemLabel ?named_after ?article ?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:P138 ?named_after. }                           # optional: benannt nach anzeigen
  FILTER(!BOUND(?named_after))                                       # Abfrage nach leerem Datenfeld
  OPTIONAL { ?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")).                           # Filter: Straßennamen beginnt mit "Kon..."
}
ORDER BY ?named_after ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?article"):::projected v7("?coordinates"):::projected v6("?image") v4("?instance_of") v3("?item"):::projected v2("?itemLabel"):::projected v1("?named_after"):::projected c6([https://de.wikipedia.org/]):::iri c13(["de"]):::literal c11(["bd:serviceParam"]):::iri c2(["wd:Q1731"]):::iri f0[["not bound(?named_after)"]] f0 --> v1 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:P138".-> v1 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P18".-> v6 end subgraph optional3["(optional)"] style optional3 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