[postgis-users] ST_INTERSECT returns false, but should return true
Satish Murthy
satish_m at hotmail.com
Fri Dec 11 07:21:05 PST 2009
That seems to be the right reason. Thanks :)
From: lr at pcorp.us
To: postgis-users at postgis.refractions.net
Date: Wed, 9 Dec 2009 20:29:48 -0500
Subject: Re: [postgis-users] ST_INTERSECT returns false, but should return true
Satish,
AsText and AsEWKT only show the first 15 or 16 digits so I suspect
your real geometries have more digits and are really off by a small
amount.
To be sure use the ST_AsHexEWKB representation of the ST_AsEWKT
instead of and you will see the distance is probably > 0
but very small.
Leo
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
Satish Murthy
Sent: Wednesday, December 09, 2009 11:28
AM
To: postgis-users at postgis.refractions.net
Subject:
[postgis-users] ST_INTERSECT returns false, but should return
true
Hi,
I can't figure out why this is happening:
This works, returning true:
SELECT Intersects(
GeomFromEWKT('MULTILINESTRING((-26.9599999999939 -29.97 1 0,-26.9399999999976 -29.99 2 0),(-25.8599999999937 -29.97 1 0,-26.9399999999976 -29.99 2 0))'),
GeomFromEWKT('POINT(-26.9599999999939 -29.97 1 0)')) ;
If I select the same as geometries, it returns false
SELECT ST_Intersects(
(select geom1 from tab),
(select geom2 from tab)) ;
Weird thing is,
select ST_DISTANCE (geom1, geom2)
returns 3.51700710773038e-14
This behavior is not consistent - sometimes ST_INTERSECTS returns true correctly.
Can anyone suggest what might be the problem here?
Thanks,
Satish
New Windows 7: Find the right PC for you. Learn more.
_________________________________________________________________
Windows 7: Find the right PC for you. Learn more.
http://windows.microsoft.com/shop
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091211/df93bba0/attachment.html>
More information about the postgis-users
mailing list