query-5c689a1557ba93b7cbd0ec09fd4ee6ea

rq turtle/ttl

Items showing two coordinates very distant each to other Items showing two coordinates very distant each to other geof:distanceHello, j'ai pas trouvé dans la doc à propos de geof:distance : je suppose que le calcul de distance fait est exprimé en kilomètres ? Par exemple dedans Items showing two coordinates very distant each to other Eléments dont les coordonnées sont très éloignées Items showing two coordinates very distant each to other Items met twee coördinaten die zeer ver van elkaar verwijderd zijn Items showing two coordinates very distant each to other Items showing two coordinates very distant each to other Items showing two coordinates very distant each to other

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 ?item ?itemLabel ?location1 ?location2 ?distance WHERE {
  ?item wdt:P31/wdt:P279* wd:Q3887 ;
    wdt:P625 ?location1 , ?location2 .        
  BIND(geof:distance(?location1, ?location2) AS ?distance ) 
  FILTER(((geof:longitude(?location1)) < (geof:longitude(?location2))) || (((geof:longitude(?location1)) = (geof:longitude(?location2))) && ((geof:latitude(?location1)) < (geof:latitude(?location2)))))
  FILTER(?distance > 80  )     
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}order by desc (?distance )

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?distance"):::projected v4("?item"):::projected v2("?location1"):::projected v3("?location2"):::projected a1((" ")) c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c4(["wd:Q3887"]):::iri f0[["?distance > '80^^xsd:integer'"]] f0 --> v5 f1[["(http://www.opengis.net/def/function/geosparql/longitude(?location1) < http://www.opengis.net/def/function/geosparql/longitude(?location2) || http://www.opengis.net/def/function/geosparql/longitude(?location1) = http://www.opengis.net/def/function/geosparql/longitude(?location2)http://www.opengis.net/def/function/geosparql/latitude(?location1) < http://www.opengis.net/def/function/geosparql/latitude(?location2))"]] f1 --> v2 f1 --> v3 v4 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 v4 --"wdt:P625"--> v2 v4 --"wdt:P625"--> v3 bind2[/"http://www.opengis.net/def/function/geosparql/distance(?location1,?location2)"/] v2 --o bind2 v3 --o bind2 bind2 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end