[postgis-users] Spatial operators

Craig Miller craig at millerfam.net
Thu Oct 10 20:03:11 PDT 2002


Since zip codes refer to polygons, perhaps you could use this data to first
attribute the polygons.  Then you can simply determine which polygon the
point is inside to determine the zip code.

--Craig

----- Original Message -----
From: "Luis Mota" <luis.mota at iscte.pt>
To: <postgis-users at postgis.refractions.net>
Sent: Thursday, October 10, 2002 10:14 AM
Subject: Re: [postgis-users] Spatial operators


> Thanks.
>
> What I am trying to do is to find i if a point is to the left or right
> of a linestring... Which is a tricky question... The problem is that I
> have some zip-code data (from a third party) which is coded as sth like
> left_zip and right_zip. As I am trying to get the address of a point, I
> need to find if this point lies on the left or right... I am assuming
> that these left/right concepts are valid when you look 'from' the
> startpoint 'to' the endpoint of the 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
>
> David Blasby wrote:
>
> >Luis,
> >
> >The operators are very simple and work on the bounding box of the
> >geometry.
> >
> > A&<B  - true if xmax(A) < xmax(B)
> >
> >A<< B  - true if xmax(A) < xmin(B)
> >
> >And the same for A&<B and A>>B.  There are no operators that work in the
> >Y direction.
> >
> >The reason these operators exists is to mimic the normal database
> >operators "<" and "<=".  They dont really have any practical use.
> >
> >If you want to sort things by Y, I would do something like:
> >
> >SELECT the_geom FROM mygeom ORDER by ymax(the_geom)
> >
> >The xmax(geom), ymax(geom), xmin(geom), ymin(geom) returns information
> >about the bounding box of a geometry.
> >
> >dave
> >
> >
> >_______________________________________________
> >postgis-users mailing list
> >postgis-users at postgis.refractions.net
> >http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
>
>
>
> _______________________________________________
> 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