[postgis-users] within/contains

Nicol Hermann postgis at geoworld.de
Thu Sep 15 00:18:49 PDT 2005


Hi List,

i wonder why the following statements returns different results:

select within(GeomFromText('POLYGON((10 10,30 10,30 20,10 20,10 10))',
-1), GeomFromText('POLYGON((0 0, 40 0, 40 30, 30 0, 0 0))', -1) );
=> FALSE

select within(GeomFromText('POLYGON((10 10,30 10,30 20,10 20,10 10))',
-1), GeomFromText('POLYGON((10 10, 40 0, 40 30, 30 0, 10 10))', -1) );
=> TRUE

I suspect the point 0/0. Do i miss something in the spec or is this a
bug? It concerns the 'Contains' function as well.

I am on Debian Sarge 

select postgis_full_version();
                                          postgis_full_version
---------------------------------------------------------------------------------------------------------
 POSTGIS="1.1.0CVS" GEOS="2.1.3" PROJ="Rel. 4.4.9, 29 Oct 2004"
USE_STATS DBPROC="0.3.1" RELPROC="0.3.1"
(1 row)


Thanks for your help
Nicol




More information about the postgis-users mailing list