query-aab04fd2100c8fcb6cd758395ba4303e

rq turtle/ttl

Coordinate check for French historical monumentHi, where there is something strange in the source database itself, apparently this cloister was moved several times...). It should be something like : (Q22920547)CloƮtre des Dominicains de Collioure I'm looking to check if the coordinates on items about French historical monument (MH) are consistent with the coordinate of the location of the same monument (or if the location is wrong, I stumble upon

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?MH ?MHLabel ?coordMH ?coordLoc ?dist WHERE {
 ?MH wdt:P380 [] ; wdt:P625 ?coordMH ; wdt:P131/wdt:P625 ?coordLoc .
 BIND( geof:distance( ?coordLoc , ?coordMH) as ?dist ) .
 FILTER (?dist > 10) .
 SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" } .
} ORDER BY DESC(?dist)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?MH"):::projected v4("?coordLoc"):::projected v3("?coordMH"):::projected v5("?dist"):::projected a1((" ")) a2((" ")) c6(["bd:serviceParam"]):::iri c8(["fr"]):::literal f0[["?dist > '10^^xsd:integer'"]] f0 --> v5 v2 --"wdt:P380"--> a1 v2 --"wdt:P625"--> v3 v2 --"wdt:P131"--> a2 a2 --"wdt:P625"--> v4 bind1[/"http://www.opengis.net/def/function/geosparql/distance(?coordLoc,?coordMH)"/] v4 --o bind1 v3 --o bind1 bind1 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end