<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>On Thu, Mar 21, 2019 at 11:29 AM Eugene Podshivalov <<a href="mailto:yaugenka@gmail.com">yaugenka@gmail.com</a>> wrote:<br></div></div></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div>If non-end points of a LINE are considered interior then the second case should evaluate to false</div></div></blockquote><div><div>As Sandro said, Touches is TRUE iff  the only points in common between g1 and g2 lie in the union of the boundaries of g1 and g2.  </div><div><br></div><div>Equivalently, Touches is TRUE iff the geometries have at least one point in common, but their interiors do not intersect.</div><div><br></div><div dir="ltr">In the second case:  </div><div dir="ltr"><br><div>A = LINESTRING (28.9019278 53.8056134, 28.901969 53.804671, 28.90144 53.8017222)<br></div><div>B = LINESTRING (28.896058 53.8047031, 28.901969 53.804671)</div><div><br></div><div>A touches B = TRUE because the single point of intersection lies in the boundary of A (it is an endpoint of the LineString).  Thus their interiors do not intersect.</div></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div> and if a POINT is an interior by itself then any area-to-point comparisons should evaluate to false also, shoudn't they?</div></div></blockquote><div><br></div><div>No, if the point lies on the boundary of the area then touches = TRUE, because the interiors do not intersect.  (As shown in the diagram on <a href="https://postgis.net/docs/ST_Touches.html">https://postgis.net/docs/ST_Touches.html</a>)</div></div></div></div>