Hello,
When I run below query through Stardog API, SNARL I get different result for 'dist' parameter and when I execute same query for same data through Web Console (localhost:5820) I get different result.
PREFIX geof: http://www.opengis.net/def/function/geosparql/
PREFIX geo: http://www.opengis.net/ont/geosparql#
PREFIX units: http://www.opengis.net/def/uom/OGC/1.0/
PREFIX ont: http://www.co-ode.org/ontologies/ont.owl#
PREFIX data: http://www.semanticweb.org/yogitas/ontologies/2017/2/openStreetMapWithData.owl#
PREFIX tags: https://raw.github.com/doroam/planning-do-roam/master/Ontology/tags.owl#
SELECT DISTINCT ?way ?speed ?dist
WHERE {
?way geo:asWKT ?p1.
?way rdf:type data:way.
bind(geof:distance(?way," POINT(10.0210995 48.4333905)"^^geo:wktLiteral,units:metre) as ?dist)
?way ^data:tag_of_way ?tag.
?tag data:k_maxspeed ?speed.
} ORDER BY ASC(?dist)
--Through API---
+-----------------------------------------------------------------+-------+-------------------------------------+
| way | speed | dist |
+------------------------------------------------------------------+-------+------------------------------------+
| http://www.co-ode.org/ontologies/ont.owl#W1 | 30 | 4.1491360460238155E1 |
| http://www.co-ode.org/ontologies/ont.owl#W0 | 30 | 1.1613483244627406E2 |
+------------------------------------------------------------------+-------+-----------------------------------+
Through UI i.e localhost:5820 :-- This seem to be correct to me.
+------------------------------------------------------------------+--------+------------------------------------+
| way | speed | dist |
+------------------------------------------------------------------+--------+-------------------------------------+
| http://www.co-ode.org/ontologies/ont.owl#W1 | 30 | 41.491360460238155E1 |
| http://www.co-ode.org/ontologies/ont.owl#W0 | 30 | 116.13483244627406E2 |
+-----------------------------------------------------------------+-------+--------------------------------------+
Is this a bug or do I have to mention units in some different way when running query through API?
Regards,
ysg