[postgis-users] Nearest linestring given a point, a tolerance and a set of linestrings?

Stefan Keller sfkeller at gmail.com
Tue Jan 22 18:24:43 PST 2013


What is the nearest interpolated point on a linestring given a single
point, a tolerance (say 100m) and a set of linestrings (i.e. a table
called myways with linestring geometry column); return way/linestring
id and distance?

It's a use case similar to snapping or to a navigation system where
you have a point and a set of lines.

I found hints to ST_Line_Interpolate_Point and ST_Line_Locate_Point
but theses posts/blogs are rather outdated and I'm not sure if KNN
index would do the job better?

- S.


More information about the postgis-users mailing list