[postgis-users] st_intersects() returns false with point and polygon that obviously intersect

Craig de Stigter craig.destigter at koordinates.com
Wed Feb 23 15:58:24 PST 2011


Hi list

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)


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


Any ideas? Thanks

Craig de Stigter

-- 
Koordinates Ltd
PO Box 1604, Shortland St, Auckland, New Zealand
Phone +64-9-966 0433 Fax +64-9-969 0045
Web http://www.koordinates.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110224/b2e83926/attachment.html>


More information about the postgis-users mailing list