[postgis-users] Obtaining nearest points between two linestrings

Rodrigo Martín LÓPEZ GREGORIO rodrigomlg at yahoo.com.ar
Thu Dec 7 13:57:50 PST 2006


Hi, first of all, sorry my english.

I was trying to find a way to obtain the coordinates of the nearest points
between two linestring. I play some time with the distance, line_locate_point,
line_interpolate_point and other functions but I didn't find a way to get
the information I want. I think that what I'm trying to find is a function
like line_locate_point that obtain the point on one linestring nearest to
another linestring.

I know that there may be lot of cases in wich the "nearest point" could be
more than one (e.g. parallel segments, two linestring with two sections of
parallel segments at the minimum distance, etc), but at least I want to get
one (any) of this points.

I also try a workaround creating a buffer around one of the linestring using
the distance between the linestrings as width, finding the intersection
between the buffer and the other linestring and obtaining the centroid of
the result, but I couldn't make this works.

Again, sorry my english and thanks for your answers. I hope that you
understand what I'm trying to do.

Rodrigo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061207/cdc8dc21/attachment.html>


More information about the postgis-users mailing list