[postgis-users] ST_Contains doesn't work?

KXK vivahome2 at gmail.com
Thu Jan 17 19:35:58 PST 2008


SELECT
 ST_Contains(
 GeomFromText('POLYGON((0 0,0 10,10 10,10 0,0 0))', -1),
 GeomFromText('POLYGON((5 5,5 6,6 6,6 5,5 5))', -1) );

returns TRUE


But,

SELECT
 ST_Contains(
 GeomFromText('POLYGON((0 0,0 11,11 10,10 0,0 0))', -1),
 GeomFromText('POLYGON((5 5,5 6,6 6,6 5,5 5))', -1) );

returns FALSE

I thought the above would also return TRUE.


Is this behavior of ST_Contains correct?

[VERSION INFORMATION]
OS: fc6
PostgreSQL: 8.2.4
PostGIS: 1.2
GEOS: 3.0.0



More information about the postgis-users mailing list