[postgis-users] find nearest point on line where distance to point not on line is minimum - or lets say drop a perpendicular on the nearest line through a given point

Marco Lechner - FOSSGIS e.V. marco.lechner at fossgis.de
Fri Oct 16 02:59:09 PDT 2009


hi,

I try to find a way to solve this problem in postgis.
I have a table with lines an coorindates of a point that needn't to be
on a line. I try to find
1. the id of the line wich is nearest to the point
2. get the coordinates of the point on the line which is nearest to the
point

--------0---------
        |
        |
        X (point X not on line)

0 is the nearest Point to X on line and therefore the Point i'm
searching for.

Any hints?

Marco

-- 

FOSSGIS e.V.
die unabhängige Hilfe bei freier GIS-Software und freien Geodaten
www.fossgis.de

+++++++++++++++++++++++++++++++++



More information about the postgis-users mailing list