[postgis-users] Spatial operators

Andy Turk andy at streetlight.com
Thu Oct 10 10:59:39 PDT 2002


> What I am trying to do is to find i if a point is to the left or right
> of a linestring... 

> For now, I suspect that these spatial operators are of no use in this
> case... I will have to deal with this in a different way... Any
> suggestions?
>
> Bye, Luís

I think this is beyond what Postgis will do for you. It's not a hard problem 
though. What you want to know is whether three points are arranged in a 
clockwise or counterclockwise fashion. The first two points being a line 
segment in your linestring and the third being the point you're trying to 
locate.

There's some straightfoward code for testing clockwiseness at 
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q121960

Look for the CCW function.




More information about the postgis-users mailing list