Geosparql geof:distance measurement in query yields bad or no result

58 Views Asked by At

I am new to geosparql, I try to measure distances between location on earth. My training sample is a simple `turtle` file derived from a `graphDB` example. It contains two points only, one in Paris the other in Lyon referenced in `EPG:2154`. :

I compute the distance with the following request :

OGC/1.0/>
PREFIX qudt: <http://qudt.org/vocab/unit/>

SELECT DISTINCT ?o1 ?o2 ?dist (geof:distance(?o1, ?o2, uom:metre) as ?dist) WHERE {
    ex:WMPoint geo:asWKT ?o1 .
    ex:APPoint geo:asWKT ?o2 .
    }

The answer is [ answer : "395913.0575631152"^^xsd:double] . If I change the value of (geof:distance(?o1, ?o2, uom:metre) as ?dist) I am stuck with the following situations :

  • with (geof:distance(?o1, ?o2, uom:meter) as ?dist) -> empty reply

  • with (geof:distance(?o1, ?o2) as ?dist) -> crazy reply ["4.017890202637487"^^xsd:double]

  • with (geof:distance(?o1, ?o2, qudt:M) as ?dist) -> empty reply

  • with (geof:distance(?o1, ?o2, qudt:KiloM) as ?dist) -> empty reply

Is that a normal behavior ? Am I using qudt in a wrong way or graphDB is it not able to use qudt ? I have also tried to compute distance in meters with (lon,lat) coordiantes in default CRS CRS:84 but it failed and I get an empty answer or degree/crazy answer. Is there a way to obtain from geosparql request with (lon,lat) values an answer in kilometers ? Thanks.

1

There are 1 best solutions below

3
Vladimir Alexiev On
degree
grid spacing
meter
metre
radian
unity