[postgis-users] Spatial operators

David Blasby dblasby at refractions.net
Thu Oct 10 09:42:14 PDT 2002


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





More information about the postgis-users mailing list