<div dir="ltr">Greetings all,<br><br>I am working on a set of data where I have noded linestrings. All linestrings have just two points and the nodes were derived from the endpoints.  <br><br>I've found one instance where st_intersects and st_equals return the incorrect value (AFAICT).<br><br>==============================<br>select<br>  a.fid, b.fid, st_astext(a.g), st_astext(b.g),<br>  st_equals(st_startpoint(b.g),a.g ) start_equals,<br>  st_equals(st_endpoint(b.g),a.g )end_equals,<br>  st_astext(st_endpoint(b.g)) = st_astext(a.g) end_text_equals,<br>  st_astext(st_startpoint(b.g)) = st_astext(a.g) start_text_equals<br>from gn.primaryline_nodes a<br>join gn.primaryline b on /*st_intersects(a.g,b.g) --*/ st_dwithin(a.g,b.g,.05)<br>where a.fid = 6097;<br>---------------------------------------<br>fid fid st_astext st_astext start_equals end_equals end_text_equals start_text_equals<br>6097 16202 POINT(767513.95 656360.7) LINESTRING(767499.7 656360.55,767513.95 656360.7) False False True False<br>6097 16201 POINT(767513.95 656360.7) LINESTRING(767513.95 656360.7,767516.95 656361.6) False False False True<br>===================<br><br>version info:<br>POSTGIS="2.1.1 r12113" GEOS="3.4.2-CAPI-1.8.2 r3924" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER<br>PostgreSQL 9.3.0, compiled by Visual C++ build 1600, 64-bit<br><br>I did a select into a new schema and the same issue occurred. I did an `update table set g = st_astext(g)::geometry` and it works fine after that.<div class="gmail_default" style="font-family:'trebuchet ms',sans-serif;display:inline">​ </div><div><div class="gmail_default" style="font-family:'trebuchet ms',sans-serif;display:inline">​</div>I've posted a dump here: <a href="https://gist.githubusercontent.com/rhysallister/3d3c59c204db726f5068/raw/gistfile1.txt">https://gist.githubusercontent.com/rhysallister/3d3c59c204db726f5068/raw/gistfile1.txt</a><br><br>Maybe someone can reproduce it. The offending fid from the primarylines_node table is 6097<br><br>Regards,<br><br><br>Rhys<br>Peace & Love|Live Long & Prosper</div></div>