[postgis-users] Looking for function to analyze linestring and points
Eric Randall
eprand at earthlink.net
Wed May 17 11:39:21 PDT 2006
You could see if your points are left or right of the line
If your polyline goes from A to B and your point is P,
v = (Ay-By)*Px+(Bx-Ax)*Py+(Ax*By-Bx*Ay)
v>0: "Left"
v<0: "Right"
v=0: "On the line" (or in front of B / behind A)
(hope that's right, I used it to check address points and road centerlines)
and then use the line orientation to determine direction from the line.
More information about the postgis-users
mailing list