<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 25, 2015 at 12:14 PM, Joseph Spenner <span dir="ltr"><<a href="mailto:joseph85750@yahoo.com" target="_blank">joseph85750@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:garamond,new york,times,serif;font-size:14px">DBD::Pg::st execute failed: ERROR:  Error performing intersection: TopologyException: Input geom 1 is invalid: Self-intersection at or near point -381688.06935935974 -1206669.4272876547 at -381688.06935935974 -1206669.4272876547 at ./<a href="http://test.pl" target="_blank">test.pl</a> line 151.<br></div></div></blockquote><div><br></div><div>Did you try ST_IsValid to verify the geometry is valid according to the OGC standard? (See <a href="http://postgis.net/docs/using_postgis_dbmanagement.html#OGC_Validity" target="_blank">http://postgis.net/docs/using_postgis_dbmanagement.html#OGC_Validity</a>. ST_IsValidDetail and ST_IsValidReason are also helpful in this regard.) What happens if you run it through ST_MakeValid? Be aware that ST_MakeValid can sometimes result in GeometryCollections if the input shape is malformed (usually "rings" without enough points are that have different start and end points).<br></div></div></div></div>