« Return to Thread: match line with road segment

Re: match line with road segment

by Stephen Woodbridge :: Rate this Message:

Reply to Author | View in Thread

searchelite wrote:
> hi all..
> i have a line table consists of gps points, i'm using
> ST_makeline(gps_points) to create the line..my question is, how to match the
> gps line into road segment in postgis?
>
> thank you

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
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

 « Return to Thread: match line with road segment