<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
That seems to be the right reason. Thanks :)<br><br><hr id="stopSpelling">From: lr@pcorp.us<br>To: postgis-users@postgis.refractions.net<br>Date: Wed, 9 Dec 2009 20:29:48 -0500<br>Subject: Re: [postgis-users] ST_INTERSECT returns false,      but should return true<br><br>




<style>
.ExternalClass .ecxhmmessage P
{padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;}
.ExternalClass BODY.ecxhmmessage
{font-family:Verdana;font-size:10pt;}
</style>



<div dir="ltr" align="left"><span class="ecx109122601-10122009"><font color="#0000ff" face="Arial">Satish,</font></span></div>
<div dir="ltr" align="left"><span class="ecx109122601-10122009"><font color="#0000ff" face="Arial">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.</font></span></div>
<div dir="ltr" align="left"><span class="ecx109122601-10122009"><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="ecx109122601-10122009"><font color="#0000ff" face="Arial">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.</font></span></div>
<div dir="ltr" align="left"><span class="ecx109122601-10122009"><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="ecx109122601-10122009"><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="ecx109122601-10122009"><font color="#0000ff" face="Arial">Leo</font> </span></div><br>
<div dir="ltr" class="ecxOutlookMessageHeader" lang="en-us" align="left">
<hr>
<font face="Tahoma"><b>From:</b> postgis-users-bounces@postgis.refractions.net 
[mailto:postgis-users-bounces@postgis.refractions.net] <b>On Behalf Of 
</b>Satish Murthy<br><b>Sent:</b> Wednesday, December 09, 2009 11:28 
AM<br><b>To:</b> postgis-users@postgis.refractions.net<br><b>Subject:</b> 
[postgis-users] ST_INTERSECT returns false, but should return 
true<br></font><br></div>
<div></div><pre>Hi,<br><br>I can't figure out why this is happening:<br><br>This works, returning true:<br>SELECT Intersects(<br>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))'), <br>    GeomFromEWKT('POINT(-26.9599999999939 -29.97 1 0)')) ;<br><br>If I select the same as geometries, it returns false<br>SELECT ST_Intersects(<br>   <br>(select geom1 from tab), <br><br>    (select geom2 from tab)) ;<br><br><br>Weird thing is, <br>   select ST_DISTANCE (geom1, geom2)<br>returns 3.51700710773038e-14<br><br>This behavior is not consistent - sometimes ST_INTERSECTS returns true correctly.<br><br>Can anyone suggest what might be the problem here?<br><br>Thanks,<br>Satish<br></pre><br>
<hr>
New Windows 7: Find the right PC for you. <a href="http://windows.microsoft.com/shop">Learn more.</a>                                       <br /><hr />Windows 7: Find the right PC for you. <a href='http://windows.microsoft.com/shop' target='_new'>Learn more.</a></body>
</html>