[postgis-users] ST_WITHIN not behaving as expected

Larry Morroni larry at morroni.com
Fri Jun 27 20:42:05 PDT 2014


Hi,
I am running PostgeSQL 9.3.4 with PostGIS 2.1.2.  I am trying to 
understand why ST_WITHIN is returning false with the following query:
SELECT ST_WITHIN(
ST_GeomFromText('POINT (-82.53946 28.00927)',4326),
ST_GeomFromText('POLYGON ((-90.0922483515624890 26.6419340127470115, 
-81.5778440546874890 28.7911293883253734, -90.0922483515624890 
28.7911293883253734, -81.5778440546874890 26.6419340127470115, 
-90.0922483515624890 26.6419340127470115))',4326)
)

If I place these shapes on a map then you can see that the point (blue) 
is clearly within this polygon bounds (attached). -> 
http://imagebin.org/314574
I probably don't understand ST_WITHIN properly.  Can someone shed some 
light for me?  What am I doing wrong?

Larry




-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2014-06-27 at 11.19.35 PM.png
Type: image/png
Size: 264104 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140627/8d7fceb7/attachment.png>


More information about the postgis-users mailing list