RES: [postgis-users] Nearest point on line
Rich Gibson
rich at testingrange.com
Mon Apr 11 14:08:38 PDT 2005
The trick is that your linestring geometry is defining a list of line
segments, not one monolithic line, so before this technique will work you
need to find the line segment that contains your closest point.
One way to do this is to walk the points in your line string and calculate
the nearest point for each line segment, and then calculate the distance
for each of those nearest points with the linked technique, and use the
closest one.
On Mon, 11 Apr 2005, Gustavo Henrique Sberze Ribas wrote:
>
> http://astronomy.swin.edu.au/~pbourke/geometry/pointline/
>
>
> --
> Gustavo
>
> > I want to go a step further though, and determine what exact point on the linestring
> > is closest to the point I have specified. Basically, I want to know the intersecting
> > point on the linestring where the distance from the specified point to the line is
> > smallest. Thanks in advance for any info that you can provide me.
>
> > Derek Figg
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
More information about the postgis-users
mailing list