« Return to Thread: match line with road segment

RE: match line with road segment

by Paragon Corporation-2 :: Rate this Message:

Reply to Author | View in Thread

You may be better off snapping the points to the line first before you do a
make line.  Take a look at Paul's blog entry.  


http://blog.cleverelephant.ca/2008/04/snapping-points-in-postgis.html

Sounds similar to what you are trying to do.

Hope that helps,
Regina

 

-----Original Message-----
From: postgis-users-bounces@...
[mailto:postgis-users-bounces@...] On Behalf Of
searchelite
Sent: Thursday, July 17, 2008 5:34 AM
To: postgis-users@...
Subject: Re: [postgis-users] match line with road segment



Stephen Woodbridge wrote:
>
> You can buffer the line and see which segments fall inside the buffer.
>
> select * from roads
>   where ST_Contains(the_geom, ST_makeline(gps_points));
>
> -Steve
>

thank you for the reply..can you be more detail please..i've tried your
suggestion but it returned no record.

I create a simple illustration below.. the green line is the record from
road table, and the red line is the route table generated from
ST_Makeline(gps_points), I want to make the red line snap into the road so
it become the route

http://www.nabble.com/file/p18504794/untitled.jpg 

Thank you in advance

--
View this message in context:
http://www.nabble.com/match-line-with-road-segment-tp18479996p18504794.html
Sent from the PostGIS - User mailing list archive at Nabble.com.

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users



_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

 « Return to Thread: match line with road segment