query-cdaa1ee424a29d609292dfa44ee33ade

rq turtle/ttl

Maps published furthest from their creators/contributors/publishers' birthplaces

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?dist ?creator ?creatorLabel ?pubplaceLabel ?birthplaceLabel ?map WHERE {

       ?class wdt:P195 wd:Q56753539 .    # KTop
       ?map wdt:P195 ?class .
       ?map (wdt:P170|wdt:P767|wdt:P123) ?creator .

       ?creator wdt:P19 ?birthplace .  ?birthplace wdt:P625 ?birthplace_coords .
       ?map wdt:P291 ?pubplace .      ?pubplace wdt:P625 ?pubplace_coords .
       BIND(geof:distance(?birthplace_coords, ?pubplace_coords) as ?dist) .

       SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

} ORDER BY DESC(?dist)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?birthplace") v6("?birthplace_coords") v2("?class") v4("?creator"):::projected v9("?dist"):::projected v3("?map"):::projected v7("?pubplace") v8("?pubplace_coords") c10(["bd:serviceParam"]):::iri c2(["wd:Q56753539"]):::iri c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P195"--> c2 v3 --"wdt:P195"--> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P123"--> v4 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P767"--> v4 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P170"--> v4 end union0r <== or ==> union0l end v4 --"wdt:P19"--> v5 v5 --"wdt:P625"--> v6 v3 --"wdt:P291"--> v7 v7 --"wdt:P625"--> v8 bind0[/"http://www.opengis.net/def/function/geosparql/distance(?birthplace_coords,?pubplace_coords)"/] v6 --o bind0 v8 --o bind0 bind0 --as--o v9 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end