query-d5e380736c1b8de089e543ee78ad7867

rq turtle/ttl

visualization on map of Stolpersteine with same photo

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
#by CamelCaseNick
#defaultView:Map{"hide": "?line"}
select ?line ?stolpersteinA ?stolpersteinB where {
  ?stolpersteinA wdt:P31 wd:Q26703203;
                 wdt:P18 ?image;
                 p:P625/psv:P625 ?geoA.
  ?geoA wikibase:geoLatitude ?latA;
        wikibase:geoLongitude ?lonA.
  ?stolpersteinB wdt:P31 wd:Q26703203;
                 wdt:P18 ?image;
                 p:P625/psv:P625 ?geoB.
  ?geoB wikibase:geoLatitude ?latB;
        wikibase:geoLongitude ?lonB.
  bind(strdt(concat('Linestring(',str(?lonA), " ", str(?latA), ",",
                    str(?lonB), " ", str(?latB),")"), geo:wktLiteral) as ?line)
  filter(str(?stolpersteinA) < str(?stolpersteinB))
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?geoA") v7("?geoB") v3("?image") v5("?latA") v8("?latB") v10("?line"):::projected v6("?lonA") v9("?lonB") v1("?stolpersteinA"):::projected v2("?stolpersteinB"):::projected a1((" ")) a2((" ")) c2(["wd:Q26703203"]):::iri f0[["str(?stolpersteinA) < str(?stolpersteinB)"]] f0 --> v1 f0 --> v2 v1 --"p:direct/P31"--> c2 v1 --"p:direct/P18"--> v3 v1 --"p:P625"--> a1 a1 --"p:statement/value/P625"--> v4 v4 --"wikibase:geoLatitude"--> v5 v4 --"wikibase:geoLongitude"--> v6 v2 --"p:direct/P31"--> c2 v2 --"p:direct/P18"--> v3 v2 --"p:P625"--> a2 a2 --"p:statement/value/P625"--> v7 v7 --"wikibase:geoLatitude"--> v8 v7 --"wikibase:geoLongitude"--> v9 bind1[/"STRDT(concat('Linestring(',str(?lonA),' ',str(?latA),',',str(?lonB),' ',str(?latB),')'),'geo:wktLiteral')"/] v6 --o bind1 v5 --o bind1 v9 --o bind1 v8 --o bind1 bind1 --as--o v10