[postgis-users] Newbie - get total distance travelled from query of points
Joe Roberts
jroberts1 at gmail.com
Sun Jun 22 13:10:41 PDT 2008
Hi,
I am very new to PostGIS, and I'm stuck with what I hope is an easy
problem to solve.
I have a table which contains a list of points, originating from a GPS
device's lat/long output. I want to get the distance travelled. I have
the following query, but the result (distance) looks far to low:
SELECT ST_Length(St_MakeLine(point))/1000 as distance
FROM (
SELECT point FROM points
ORDER BY timestamp
) as p
I know the route was over 5 miles (probably about about 8.4 km), but
the query returns 0.000106496.
Can anyone see what I am doing wrong? Is it my query, or could it be
my data?
Many thanks
Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080622/3f9cbd39/attachment.html>
More information about the postgis-users
mailing list