id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 845,ST_Intersects() precision error - returns false instead of true,cdestigter,strk,"This query returns false, but the box and point intersect: {{{ select st_intersects('POINT(169.69960846592 -46.5061209281002)'::geometry, 'POLYGON((169.699607857174 -46.5061218662,169.699607857174 -46.5061195965597,169.699608806526 -46.5061195965597,169.699608806526 -46.5061218662,169.699607857174 -46.5061218662))'::geometry); st_intersects --------------- f (1 row) }}} More info: {{{ st_relate | st_intersects | st_disjoint -----------+---------------+------------- 0FFFFF212 | f | f ST_Relate is correct, ST_Disjoint is correct, ST_Intersects is _wrong_ I B E ----- I 0 F F B F F F E 2 1 2 }}} Tested on postgis 1.5.2. postgis_version(): 1.5 USE_GEOS=1 USE_PROJ=1 USE_STATS=1 Using geos via python it works: {{{ >>> from django.contrib.gis import geos >>> p = geos.GEOSGeometry('POLYGON((169.699607857174 -46.5061218662,169.699607857174 -46.5061195965597,169.699608806526 -46.5061195965597,169.699608806526 -46.5061218662,169.699607857174 -46.5061218662))') >>> pt = geos.GEOSGeometry('POINT(169.69960846592 -46.5061209281002)') >>> pt.intersects(p) True }}} Probably a precision error, since this polygon is very small. [http://postgis.refractions.net/pipermail/postgis-users/2011-February/028965.html postgis-users thread]",defect,closed,medium,PostGIS 1.5.3,postgis,1.5.X,fixed,history,