Commit a89bf27a authored by Jürg Billeter's avatar Jürg Billeter

libtracker-data: Use integers for comparison in location test

String representations of doubles may differ on different platforms,
so only compare distances after conversion to integers for now.
parent bb24ee56
"Helsinki" "0.0" "0.0"
"Tampere" "161905.358015775" "160759.509081122"
"London" "1898317.54736874" "1821325.85595572"
"Tuvalu" "14017010.3444867" "13884463.8434573"
"Helsinki" "0" "0"
"Tampere" "161905" "160759"
"London" "1898317" "1821325"
"Tuvalu" "14017010" "13884463"
PREFIX ex: <http://example/>
PREFIX ns: <http://www.w3.org/2005/xpath-functions#>
SELECT ?location tracker:cartesian-distance(?lat1,?lat2,?lon1,?lon2) tracker:haversine-distance(?lat1,?lat2,?lon1,?lon2)
SELECT ?location xsd:integer(tracker:cartesian-distance(?lat1,?lat2,?lon1,?lon2)) xsd:integer(tracker:haversine-distance(?lat1,?lat2,?lon1,?lon2))
{ ?_x a ex:Location ;
ex:name ?location ;
ex:latitude ?lat1 ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment