[postgis-users] Spatial Operator Documentation (was geos result sets)

Wood Brent pcreso at pcreso.com
Wed Feb 25 15:17:08 PST 2004



This is a down to earth example of topology in action, I have used it in
workshops to illustrate a classic question. 

I'm interested to know how GEOS answers the question, as depending on your
predicate, either can be correct.


There is a broom in a closet in, the closet is in a room in a house. (assume
the closet, room & house are polygons, the closet in the room in the house, the
broom can be a point)

Question: Is the broom in the house?

(general answer = yes)

There is a fish in a pond in an island in a lake. Same topology as above.

Question: Is the fish in the lake?

(general answer = no)


So, depending on the user's requirements, either answer can be correct.


Does PostGIS/GEOS topology support islands? ie, a complex polygon is defined by
an outer boundary with holes inside or as an outer boundary only. As I
understand it, only simple polygons are supported.

In this case I presume sub-queries can be used to test for containment in the
outer polygon and no containment in any polygons contained by the outer
polygon.



Has anyone implemented a system using PostGIS where the topological
relationships of complex polygons islands are supported, so that the fish IS
NOT in the lake but IS in the pond, as well as a system which returns the broom
IS in the house?


Aside: I am pleased to see the separation of touch & intersect as functions :-)


Cheers

  Brent Wood




More information about the postgis-users mailing list