<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi,<br><br>Not having tried this, but perhaps:<br><br>Use ST_Polygonize() on the linestrings as in the example here:<br><a href="http://postgis.org/docs/ST_Polygonize.html">http://postgis.org/docs/ST_Polygonize.html</a><br><br>You could use ST_Dump() to return the polygons & wrap it up in count() for the where clause, so only linestrings able to generate one or more polygons are returned.<br><br>This should identify the self-crossing linestrings, as only such linestrings can form a closed polygon boundary.<br><br>HTH,<br><br>  Brent Wood<br><br><br>--- On Sun, 2/19/12, Hilton Long <seldomseen@scinternet.net> wrote:<br><br>From: Hilton Long <seldomseen@scinternet.net><br>Subject: [postgis-users] Need help detecting lassos<br>To:<br> postgis-users@postgis.refractions.net<br>Date: Sunday, February 19, 2012, 11:58 AM<br><br>I’d like to be
 able to detect all line loops that are not closed, but where one end of the line loops around and terminates on another line (a lasso).  Querying a table containing several of these returns no ST_IsClosed=true, or ST_IsValid=false, or ST_IsSimple=false.  Ultimately, I’d like to split the original loop into a line segment = two loop halves.  Thanks In Advance.    <br>-----Inline Attachment Follows-----<br><br>_______________________________________________<br>postgis-users mailing list<br>postgis-users@postgis.refractions.net<br>http://postgis.refractions.net/mailman/listinfo/postgis-users<br></td></tr></table>