SDC edit

Bilder mit Motiv Torgau edit

#workaround to show the images in an image grid
#defaultView:ImageGrid
SELECT ?file ?image WHERE {
  ?file wdt:P180 wd:Q12062 .
  ?file schema:contentUrl ?url .
  bind(iri(concat("http://commons.wikimedia.org/wiki/Special:FilePath/", replace(substr(str(?url),53),"_","%20"))) AS ?image)
}
Try it!

Bilder eine Nutzers auf Karte edit

# Map of files authored by a Wikimedia Commons user
#TEMPLATE={"template":"Map of files authored by ?username","variables":{"?username":{"query":" SELECT DISTINCT ?username WHERE { [] p:P170/pq:P4174 ?username .} LIMIT 100"} } }
#defaultView:Map
SELECT ?file ?image ?coordinates (?date AS ?layer)  (wikibase:decodeUri(CONCAT("File:", substr(str(?url),53))) AS ?filename)
WHERE {
BIND("Lutzto" AS ?username)
?file (p:P170/pq:P4174) ?username;
OPTIONAL {?file  wdt:P625|wdt:P1259 ?coordinates. }
OPTIONAL { ?file wdt:P571 ?date. }
# convert file into image
?file schema:contentUrl ?url .
bind(iri(concat("http://commons.wikimedia.org/wiki/Special:FilePath/", wikibase:decodeUri(substr(str(?url),53)))) AS ?image)
}
LIMIT 10000
Try it!

Bilder ohne Angabe von Motiv in Torgau edit

Im Auge behalten edit

- wiederhergestellt = restauriert
- erneuert = renoviert

Kursächsische Postmeilensäulen edit

#-------------------------------------------------------------------------------
# Kursächsische Postmeilensäulen
#-------------------------------------------------------------------------------
#defaultView:Map;Table
SELECT DISTINCT ?item ?itemLabel ?image ?coordinates WHERE {
  ?item (wdt:P31+) wd:Q896635.
  OPTIONAL { ?item wdt:P18 ?image. }
  OPTIONAL { ?item wdt:P625 ?coordinates. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
}
Try it!
#------------------------------------------------------------------------------------------------
# Kursächsische Postmeilensäulen (für interne Weiterverarbeitung zur tsv für "Historic.Place)
#------------------------------------------------------------------------------------------------
#defaultView:Map;Table
SELECT DISTINCT ?lon ?lat ?group ?item ?itemLabel ?itemDescription ?start_date ?coordinates ?heritage2 ?image  ?heritage (URI(CONCAT("Category:", ?wikimedia)) as ?wikimedia_commons) ?wikipedia {
  ?item p:P31/ps:P31 wd:Q896635 ;
  OPTIONAL {?item p:P625 ?coordinate.
  ?coordinate psv:P625 ?coordinate_node.
  ?coordinate_node wikibase:geoLatitude ?lat.
  ?coordinate_node wikibase:geoLongitude ?lon. }
  OPTIONAL { ?item wdt:P625 ?coordinates. }
  OPTIONAL { ?item wdt:P571 ?inception. }
  OPTIONAL { ?item wdt:P18 ?image. }
  OPTIONAL { ?item wdt:P373 ?wikimedia. }
  OPTIONAL { ?item wdt:P1708 ?heritage2. }
  OPTIONAL { ?item wdt:P1708 ?heritage. }
  OPTIONAL { ?sitelink schema:about ?item.
             FILTER(REGEX(STR(?sitelink), "de.wikipedia.org/wiki/"))}      # nur deutsche Wikipedia-Artikel
  BIND((bound(?sitelink) ) AS ?has_de_sitelink).                         # true/false - wenn de-Artikel vorhanden   

  BIND(URI(CONCAT("https://de.wikipedia.org/wiki/Kurs%C3%A4chsische_Postmeilens%C3%A4ule")) as ?url2).  # alternative URL bauen
  
  BIND(  IF( ?has_de_sitelink ,?sitelink ,?url2 ) AS ?wikipedia).           # if ... then ... else
  

 
  BIND(str(YEAR(?inception)) AS ?start_date)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }

}
ORDER BY ?itemLabel
Try it!

Königlich-Sächsische Triangulirung edit

#-------------------------------------------------------------------------------
# Königlich-Sächsische Triangulirung
#-------------------------------------------------------------------------------
#defaultView:Map;Table
SELECT DISTINCT ?item ?itemLabel ?image ?coordinates WHERE {
  ?item (wdt:P361+) wd:Q1796040.
  OPTIONAL { ?item wdt:P18 ?image. }
  OPTIONAL { ?item wdt:P625 ?coordinates. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
}
Try it!
#------------------------------------------------------------------------------------------------
# Königlich-Sächsische Triangulirung (für interne Weiterverarbeitung zur tsv für "Historic.Place)
#------------------------------------------------------------------------------------------------
#defaultView:Map;Table
SELECT DISTINCT ?lon ?lat ?group ?item ?itemLabel ?itemDescription ?start_date ?heritage2 ?image ?coordinates ?heritage (URI(CONCAT("Category:", ?wikimedia)) as ?wikimedia_commons) ?man_made ?network ?classification ?wikipedia {
  ?item p:P361/ps:P361 wd:Q1796040 ;
  OPTIONAL {?item p:P625 ?coordinate.
  ?coordinate psv:P625 ?coordinate_node.
  ?coordinate_node wikibase:geoLatitude ?lat.
  ?coordinate_node wikibase:geoLongitude ?lon. }
  OPTIONAL { ?item wdt:P625 ?coordinates. }
  OPTIONAL { ?item wdt:P571 ?inception. }
  OPTIONAL { ?item wdt:P18 ?image. }
  OPTIONAL { ?item wdt:P373 ?wikimedia. }
  OPTIONAL { ?item wdt:P1708 ?heritage2. }
  OPTIONAL { ?item wdt:P1708 ?heritage. }
  OPTIONAL { ?sitelink schema:about ?item.
             FILTER(REGEX(STR(?sitelink), "de.wikipedia.org/wiki/"))}      # nur deutsche Wikipedia-Artikel
  BIND((bound(?sitelink) ) AS ?has_de_sitelink).                         # true/false - wenn de-Artikel vorhanden   

  BIND(URI(CONCAT("https://de.wikipedia.org/wiki/K%C3%B6niglich-S%C3%A4chsische_Triangulirung")) as ?url2).  # alternative URL bauen
  
  BIND(  IF( ?has_de_sitelink ,?sitelink ,?url2 ) AS ?wikipedia).           # if ... then ... else
 
  BIND(str(YEAR(?inception)) AS ?start_date)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }

}
ORDER BY ?itemLabel
Try it!

Königlich Sächsiche Postmeilensteine edit

Klingenberg, Klingenthal, Kriebstein, Treuen, Trogen keine Daten
Neusornzig Stein verschwunden
Wurzen Badergraben kein Stein gefunden
#-------------------------------------------------------------------------------
# Königlich Sächsiche Postmeilensteine
#-------------------------------------------------------------------------------
#defaultView:Map;Table
SELECT DISTINCT ?item ?itemLabel ?image ?coordinates WHERE {
  ?item (wdt:P31+) wd:Q84163056.
  OPTIONAL { ?item wdt:P18 ?image. }
  OPTIONAL { ?item wdt:P625 ?coordinates. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
}
Try it!

Preußischer optischer Telegraf edit

#-------------------------------------------------------------------------------
# Preußischer optischer Telegraf
#-------------------------------------------------------------------------------
#defaultView:Map;Table
SELECT DISTINCT ?item ?itemLabel ?image ?coordinates WHERE {
  ?item (wdt:P361+) wd:Q870831.
  OPTIONAL { ?item wdt:P18 ?image. }
  OPTIONAL { ?item wdt:P625 ?coordinates. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
}
Try it!
#--------------------------------------------------------------------------------------------
# Preußischer optischer Telegraf (für interne Weiterverarbeitung zur tsv für "Historic.Place)
#--------------------------------------------------------------------------------------------
#defaultView:Map;Table
SELECT DISTINCT ?lon ?lat ?item ?itemLabel ?itemDescription ?start_date ?image ?coordinates ?URL1 ?URL2 (URI(CONCAT("Category:", ?wikimedia)) as ?wikimedia_commons) ?wikipedia {
  ?item p:P361/ps:P361 wd:Q870831 ; 
  OPTIONAL {?item p:P625 ?coordinate.
  ?coordinate psv:P625 ?coordinate_node.
  ?coordinate_node wikibase:geoLatitude ?lat.
  ?coordinate_node wikibase:geoLongitude ?lon. }
  OPTIONAL { ?item wdt:P625 ?coordinates. }
  OPTIONAL { ?item wdt:P571 ?inception. }
  OPTIONAL { ?item wdt:P18 ?image. }
  OPTIONAL { ?item wdt:P373 ?wikimedia. }
  OPTIONAL { ?item wdt:P973 ?URL1. 
             FILTER(REGEX(STR(?URL1), "www.optische-telegraphie.de")) . }
  OPTIONAL { ?item wdt:P973 ?URL2. 
             FILTER(REGEX(STR(?URL2), "www.optischertelegraph4.de")) . }  
 
  OPTIONAL { ?sitelink schema:about ?item.
             FILTER(REGEX(STR(?sitelink), "de.wikipedia.org/wiki/"))}      # nur deutsche Wikipedia-Artikel
  BIND((bound(?sitelink) ) AS ?has_de_sitelink).                         # true/false - wenn de-Artikel vorhanden   

  BIND(URI(CONCAT("https://de.wikipedia.org/wiki/Preu%C3%9Fischer_optischer_Telegraf")) as ?url2).  # alternative URL bauen
  
  BIND(  IF( ?has_de_sitelink ,?sitelink ,?url2 ) AS ?wikipedia).           # if ... then ... else
 BIND(str(YEAR(?inception)) AS ?start_date)
 SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }

}
ORDER BY ?itemLabel
Try it!

Alle Objekte in Torgau edit

#-------------------------------------------------------------------------------
# alle Objekte in Torgau
#-------------------------------------------------------------------------------
#defaultView:Map;Table
SELECT DISTINCT ?item ?itemLabel ?image ?Commons_Kategorie ?article ?coordinates WHERE {
  ?item (wdt:P131+) wd:Q12062.
  OPTIONAL { ?item wdt:P18 ?image. }
  OPTIONAL { ?Commons_Kategorie schema:about ?item; schema:isPartOf <https://commons.wikimedia.org/>. }
  OPTIONAL { ?article schema:about ?item; schema:isPartOf <https://de.wikipedia.org/>. }
  OPTIONAL { ?item wdt:P625 ?coordinates. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
}
Try it!

Objekte in Torgau ohne Mapy.cz ID edit

#-------------------------------------------------------------------------------
# Objekte in Torgau ohne Koordinaten
#-------------------------------------------------------------------------------
#defaultView:Map{"layer": ??coordinates, "hide": ["?coordinates", "?instance_ofLabel"]};Table
#Artikellink
# Commons-Link
SELECT DISTINCT ?item ?itemLabel ?article ?coordinates ?mapy ?image WHERE {
?item wdt:P131 wd:Q12062.
OPTIONAL {
?article schema:about ?item;
schema:isPartOf <https://de.wikipedia.org/>.
}
OPTIONAL {
?commons schema:about ?item;
schema:isPartOf <https://commons.wikimedia.org/>.
}
OPTIONAL { ?item wdt:P18 ?image. }
OPTIONAL { ?item wdt:P8988 ?mapy. }
FILTER(!(BOUND(?mapy)))
OPTIONAL { ?item wdt:P625 ?coordinates. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
}
Try it!

Objekte in Torgau ohne Bild edit

#-------------------------------------------------------------------------------
# Objekte in Torgau ohne Bild (nur Bilder auf Commons sind erlaubt)
#-------------------------------------------------------------------------------
#defaultView:Map{"layer": ?named_after, "hide": ["?coordinates", "?instance_ofLabel"]};Table
#Artikellink
# Commons-Link
SELECT DISTINCT ?item ?itemLabel ?article ?coordinates ?image WHERE {
  ?item wdt:P131 wd:Q12062.
  OPTIONAL {
    ?article schema:about ?item;
      schema:isPartOf <https://de.wikipedia.org/>.
  }
  OPTIONAL {
    ?commons schema:about ?item;
      schema:isPartOf <https://commons.wikimedia.org/>.
  }
  OPTIONAL { ?item wdt:P18 ?image. }
  FILTER(!(BOUND(?image)))
  OPTIONAL { ?item wdt:P625 ?coordinates. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
}
Try it!

Objekte in Torgau ohne Koordinaten edit

#-------------------------------------------------------------------------------
# Objekte in Torgau ohne Koordinaten
#-------------------------------------------------------------------------------
#defaultView:Map{"layer": ?coordinates, "hide": ["?coordinates", "?instance_ofLabel"]};Table
#Artikellink
# Commons-Link
SELECT DISTINCT ?item ?itemLabel ?article ?coordinates ?image WHERE {
?item wdt:P131 wd:Q12062.
OPTIONAL {
?article schema:about ?item;
schema:isPartOf <https://de.wikipedia.org/>.
}
OPTIONAL {
?commons schema:about ?item;
schema:isPartOf <https://commons.wikimedia.org/>.
}
OPTIONAL { ?item wdt:P18 ?image. }
FILTER(!(BOUND(?coordinates)))
OPTIONAL { ?item wdt:P625 ?coordinates. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
}
Try it!

Objekte in Torgau ohne Höhe über dem Meeresspiegel edit

#-------------------------------------------------------------------------------
# Objekte in Torgau ohne Höhe über dem Meeresspiegel  
#-------------------------------------------------------------------------------
#defaultView:Map{"layer": ?elevation, "hide": ["?coordinates", "?instance_ofLabel"]};Table
#Artikellink
# Commons-Link
SELECT DISTINCT ?item ?itemLabel ?article ?coordinates ?image WHERE {
  ?item wdt:P131 wd:Q12062.
  OPTIONAL {
    ?article schema:about ?item;
      schema:isPartOf <https://de.wikipedia.org/>.
  }
  OPTIONAL {
    ?commons schema:about ?item;
      schema:isPartOf <https://commons.wikimedia.org/>.
  }
  OPTIONAL { ?item wdt:P2044 ?elevation. }
  FILTER(!(BOUND(?elevation)))
  OPTIONAL { ?item wdt:P625 ?coordinates. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
}
Try it!

Objekte in Torgau ohne deutsches Label edit

PREFIX schema: <http://schema.org/>
#-------------------------------------------------------------------------------
# Objekte in Torgau ohne deutsches Label
#-------------------------------------------------------------------------------
#defaultView:Table
SELECT DISTINCT 
?item ?label_de ?itemLabel ?itemDescription ?article ?image ?coordinates  
WHERE {  
?item wdt:P131 wd:Q12062. # in Torgau
#Artikellink  
OPTIONAL {
    ?article schema:about ?item.
    ?article schema:isPartOf <https://de.wikipedia.org/>.
  }
  # Commons-Link
  OPTIONAL {?commons 	schema:about ?item ;
           schema:isPartOf <https://commons.wikimedia.org/> .
  }
   OPTIONAL { ?item wdt:P18 ?image. }
   OPTIONAL { ?item wdt:P625 ?coordinates. }
  # kein deutsches Label
  OPTIONAL {
      ?item rdfs:label ?label_de.                                  # Label abspeichern
      filter (lang(?label_de) = "de").                             # Label nur auf Deutsch filtern
  }
  FILTER(!BOUND(?label_de))                                        # Filter Objekte, die kein deutsches Label haben

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de,ru,es,fr,cs,pl,nl,dk" }     # Label in anderen Sprachen anzeigen
}
order by ?itemLabel ?itemDescription  ?article ?coordinates ?image
Try it!

Objekte in Torgau ohne englisches Label edit

PREFIX schema: <http://schema.org/>
#-------------------------------------------------------------------------------
# Objekte in Torgau ohne englisches Label
#-------------------------------------------------------------------------------
#defaultView:Table
SELECT DISTINCT 
?item ?label_en ?itemLabel ?itemDescription ?article ?image ?coordinates  
WHERE {  
?item wdt:P131 wd:Q12062. # in Torgau
#Artikellink  
OPTIONAL {
    ?article schema:about ?item.
    ?article schema:isPartOf <https://de.wikipedia.org/>.
  }
  # Commons-Link
  OPTIONAL {?commons 	schema:about ?item ;
           schema:isPartOf <https://commons.wikimedia.org/> .
  }
   OPTIONAL { ?item wdt:P18 ?image. }
   OPTIONAL { ?item wdt:P625 ?coordinates. }
  # kein englisches Label
  OPTIONAL {
      ?item rdfs:label ?label_en.                                  # Label abspeichern
      filter (lang(?label_en) = "en").                             # Label nur auf Englisch filtern
  }
  FILTER(!BOUND(?label_en))                                        # Filter Objekte, die kein englisches Label haben

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de,ru,es,fr,cs,pl,nl,dk" }     # Label in anderen Sprachen anzeigen
}
order by ?itemLabel ?itemDescription  ?article ?coordinates ?image
Try it!


Straßen und Plätze in Torgau edit

#---------------------------------------------------------------------------------------
# Straßen und Plätze in Torgau
#---------------------------------------------------------------------------------------
#defaultView:Map{"layer":"?instance_ofLabel"}
SELECT  ?item ?itemLabel ?itemDescription ?coordinate ?commons ?instance_ofLabel
WHERE {    
  ?item (wdt:P131/wdt:P279*) wd:Q12062.                   # liegt in Verwaltungseinheit Torgau
    VALUES ?instance_of { 
      wd:Q79007      # Innerortstraße
      wd:Q21000333   # Einkaufsstraße 
      wd:Q174782     # Platz
    } 
  ?item wdt:P31 ?instance_of.                            # ist Straße oder Platz  
  OPTIONAL{?item wdt:P625 ?coordinate.}                  # Koordinate für Kartendarstellung auslesen
  OPTIONAL{?item wdt:P373 ?commons.}                     
  #BIND(IF(BOUND(?street),"FFA500","7FFF00") AS ?rgb)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en,[AUTO_LANGUAGE]". }
}
Try it!

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

#-------------------------------------------------------------------------------
# Straßen, Plätze und Brücken in Torgau ohne "benannt nach"
#-------------------------------------------------------------------------------
PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?itemLabel ?named_after ?article ?coordinates 
WHERE {
  ?item wdt:P131 wd:Q12062.                                          # Objekt liegt in Torgau
  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
}
ORDER BY ?named_after ?itemLabel
Try it!

Straßen, Plätze und Brücken in Torgau ohne "Höhe über den Meeresspiegel" edit

#-------------------------------------------------------------------------------
# Straßen, Plätze und Brücken in Torgau ohne "Höhe über den Meeresspiegel"
#-------------------------------------------------------------------------------
PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?itemLabel ?elevation ?article ?coordinates 
WHERE {
  ?item wdt:P131 wd:Q12062.                                          # Objekt liegt in Torgau
  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:P2044 ?elevation. }                           # optional: Höhe über dem Meeresspiegel anzeigen
FILTER(!BOUND(?elevation))                                       # 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
}
ORDER BY ?named_after ?itemLabel
Try it!

Abgegangene Bauwerke in Torgau edit

#-------------------------------------------------------------------------------
# Abgegangene Bauwerke in Torgau
#-------------------------------------------------------------------------------
#defaultView:Map;
SELECT ?item ?itemLabel ?itemDescription ?image ?coordinate WHERE {
  ?item (wdt:P131/wdt:P279*) wd:Q12062 .
  ?item (wdt:P31/wdt:P279*) wd:Q19860854.
  OPTIONAL { ?item wdt:P18 ?image . }
  OPTIONAL { ?item wdt:P625 ?coordinate . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en,[AUTO_LANGUAGE]". }
}
Try it!