[postgis-users] Spatial operators
Luis Mota
luis.mota at iscte.pt
Thu Oct 10 10:14:13 PDT 2002
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
>
More information about the postgis-users
mailing list