<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 10.00.9200.16576"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=820242004-18052013><FONT color=#0000ff 
size=2 face=Arial>ST_AsText rounds data so what you get back is not to the 
precision actually stored in your database.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=820242004-18052013><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=820242004-18052013><FONT color=#0000ff 
size=2 face=Arial>Try using</FONT></SPAN><SPAN class=820242004-18052013><FONT 
color=#0000ff size=2 face=Arial></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=820242004-18052013><FONT color=#0000ff 
size=2 face=Arial>ST_DWithin instead and adding in a small amount of buffer e.g. 
ST_DWithin(geom, your_point,0.00001)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=820242004-18052013><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=820242004-18052013><FONT color=#0000ff 
size=2 face=Arial>playing around with the distance.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=820242004-18052013><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=820242004-18052013><FONT color=#0000ff 
size=2 face=Arial>We never rely on intersects for point - line checks because if 
you have floating point junk it really screws up your 
calculations.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=820242004-18052013><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=820242004-18052013><FONT color=#0000ff 
size=2 face=Arial>Leo and Regina</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=820242004-18052013><FONT color=#0000ff 
size=2 face=Arial><A 
href="http://www.postgis.us">http://www.postgis.us</A></FONT></SPAN></DIV><BR>
<DIV lang=en-us class=OutlookMessageHeader dir=ltr align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> postgis-users-bounces@lists.osgeo.org 
[mailto:postgis-users-bounces@lists.osgeo.org] <B>On Behalf Of </B>Richard 
Cernava<BR><B>Sent:</B> Friday, May 17, 2013 7:40 PM<BR><B>To:</B> 
postgis-users@lists.osgeo.org<BR><B>Subject:</B> [postgis-users] Strange 
behavior<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>I'm trying to query if a point is present inside a MultiLineString. 
When I run the following query I get very strange results in my opinion. If 
someone could elaborate as to what's going on it would be very much 
appreciated! 
<DIV><BR></DIV>
<DIV>From this query I get a false and a true on the identical data. First I 
check to see if the_geom intersects with my point and receive false. Second I 
take the_geom and convert it to text and then compare it with my point 
using ST_GeomFromText and get true. How is this possible? I've outputted 
the result from the statement below.<BR>
<DIV><BR></DIV>
<DIV>
<DIV>
<DIV>SELECT fullname, ST_X(ST_StartPoint(ST_LineMerge(the_geom))), 
ST_Y(ST_StartPoint(ST_LineMerge(the_geom))),</DIV>
<DIV>ST_AsText(the_geom) AS text,</DIV>
<DIV>ST_Intersects(the_geom, ST_GeomFromText('POINT(-122.837109 45.537746)', 
4269)) AS fromdb,</DIV>
<DIV>ST_Intersects(ST_GeomFromText(ST_AsText(the_geom), 4269), 
ST_GeomFromText('POINT(-122.837109 45.537746)', 4269)) AS fromtxt</DIV>
<DIV>from tiger_data.or_edges where   fullname like 'NW Norwich St' limit 
1</DIV>
<DIV><BR></DIV></DIV>
<DIV><BR></DIV>
<DIV>"NW Norwich St";-122.837109;45.537746;"MULTILINESTRING((-122.837109 
45.537746,-122.837253 45.537684,-122.837718 45.537368,-122.837829 
45.537288,-122.838081 45.537108,-122.838169 45.537049))";f;t<BR></DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>-- <BR>-Richard </DIV></DIV></DIV></BODY></HTML>