[postgis-users] Looking for function to analyze linestring and points

Brent Wood pcreso at pcreso.com
Fri May 5 17:15:34 PDT 2006



--- David Bitner <osgis.lists at gmail.com> wrote:

> If it is an exactly east-west line then you just need to compare the y
> coordinates of your points with the y coordinate of your line.
> 
> On 5/5/06, Baris YILMAZ <baris_999 at yahoo.com> wrote:
> >
> > Hi ,
> >
> > I have some points arbitrarily on a map, which are read from postgis
> > database. And  I have a linestring which goes through the area of these
> > points from west to east. Is there a function to find out, whether a  point
> > falls on the to south of the linestring or the other part?

If the line is east/west (at least in some projection) then use |>> or |&> to
compare bounding boxes?

If the line is not horizontal, then perhaps something like polygonise the
linestring & its bounding box to create two triangles & see which of these the
point lies within?


HTH,

 Brent Wood


Brent Wood



More information about the postgis-users mailing list