[postgis-users] ST_INTERSECT returns false, but should return true
Paragon Corporation
lr at pcorp.us
Wed Dec 9 17:29:48 PST 2009
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.
<http://windows.microsoft.com/shop>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091209/f2c9def3/attachment.html>
More information about the postgis-users
mailing list