« Return to Thread: match line with road segment
(SELECT
pt_id,
ln_id,
ST_Line_Interpolate_Point(
ln_geom,
ST_Line_Locate_Point(ln_geom, pt_geom)
) As snapped_point,
travel_id
FROM
(
SELECT DISTINCT ON (pt.gid)
ln.the_geom AS ln_geom,
pt.the_geom AS pt_geom,
ln.id AS ln_id,
pt.gid AS pt_id,pt.trip_id
FROM
gps_points pt INNER JOIN
road_table ln
ON
ST_DWithin(pt.the_geom, ln.the_geom, 10.0)
ORDER BY
pt.gid,ST_Distance(ln.the_geom, pt.the_geom)
) AS subquery ORDER BY trip_id, pt_id) As snapped_points
GROUP BY travel_id;
Paragon Corporation-2 wrote:
>
> 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
>
>
Thanks for the reply...Yes, I already did that (snapping the point to the
line)..so, is there any idea what should i do next?
thanks
--
View this message in context: http://www.nabble.com/match-line-with-road-segment-tp18479996p18509643.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
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
Help make the earth a greener place. If at all possible resist printing this email and join us in saving paper.
« Return to Thread: match line with road segment
| Free embeddable forum powered by Nabble | Forum Help |