[postgis-users] Contains failing

David Vaz davidvaz at dcc.fc.up.pt
Wed Oct 15 08:55:30 PDT 2008


Hi,

Does anyone have a clue why this fails:

select contains(geomfromtext('POLYGON((0 0,0 8,8 8,8 0,0 0),(3 3,5 3,5
5,3 5,3 3))'), geomfromtext('POLYGON((0 0,5 0,5 1,0 1,0 0))'))
;
 contains
----------
 f
(1 row)

Without the Hole in the polygon

select contains(geomfromtext('POLYGON((0 0,0 8,8 8,8 0,0 0))'),
geomfromtext('POLYGON((0 0,5 0,5 1,0 1,0 0))'))
;
 contains
----------
 t
(1 row)


And the Hole does not intersects the other polygon

select intersects(geomfromtext('POLYGON((3 3,5 3,5 5,3 5,3 3))'),
geomfromtext('POLYGON((0 0,5 0,5 1,0 1,0 0))'))
;
 intersects
------------
 f
(1 row)



More information about the postgis-users mailing list