[postgis-users] calculate distance between points

Nicklas Avén nicklas.aven at jordogskog.no
Thu Jan 14 06:00:10 PST 2010


Hallo  To just get the distance between the points you could do with something like select ST_Distance(a.the_geom, b.the_geom) as dist from pointtable a inner join pointtable b on a.gid = b.gid+1 if your gid value is in integer and ordered chronlogically
But I guess that what you want is the length of the linesegments between two points. That can be more tricky because if you have passed two crossings during that minute you might have alternative paths. So then you are dealing with routing. /Nicklas
2010-01-14 searchelite wrote:


>Hi All..
>
>I have two tables which are street and update_points. Assuming that the
>update interval is every one minute, how to calculate the distance between
>two update point in the street segments (the points are already interpolated
>into the segments)
>
>Thanks in advance
>-- 
>View this message in context: http://old.nabble.com/calculate-distance-between-points-tp27161415p27161415.html
>Sent from the PostGIS - User mailing list archive at Nabble.com.
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100114/3855dffb/attachment.html>


More information about the postgis-users mailing list