query-da492230ef96532062183b9721ddcebe
Rivers where the source and mouth are more less 100 m apart SELECT * WHERE { ?river wdt:P31/wdt:P279* wd:Q355304 . ?river p:P625 [ ps:P625 ?coord1 ; pq:P518 wd:Q7376362 ] . ?river p:P625 [ ps:P625 ?coord2 ; pq:P518 wd:Q1233637 ] . BIND(geof:distance(?coord1, ?coord2) AS ?dist). FILTER(?dist < 0.1 ). }
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
#Rivers where the source and mouth are more less 100 m apart
SELECT * WHERE {
?river wdt:P31/wdt:P279* wd:Q355304 .
?river p:P625 [ ps:P625 ?coord1 ; pq:P518 wd:Q7376362 ] .
?river p:P625 [ ps:P625 ?coord2 ; pq:P518 wd:Q1233637 ] .
BIND(geof:distance(?coord1, ?coord2) AS ?dist).
FILTER(?dist < 0.1 ).
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?coord1"):::projected
v4("?coord2"):::projected
v5("?dist"):::projected
v2("?river"):::projected
a1((" "))
a2((" "))
a3((" "))
c9(["wd:Q1233637"]):::iri
c4(["wd:Q355304"]):::iri
c7(["wd:Q7376362"]):::iri
f0[["?dist < '0.1^^xsd:decimal'"]]
f0 --> v5
v2 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c4
a2 --"p:statement/P625"--> v3
a2 --"p:qualifier/P518"--> c7
v2 --"p:P625"--> a2
a3 --"p:statement/P625"--> v4
a3 --"p:qualifier/P518"--> c9
v2 --"p:P625"--> a3
bind1[/"http://www.opengis.net/def/function/geosparql/distance(?coord1,?coord2)"/]
v3 --o bind1
v4 --o bind1
bind1 --as--o v5