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

Thank you in advance