<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-size:12.8px">thanks for your feedback. Shouldn't this be reported by ST_IsValid also?</span><br></blockquote><div><br></div><div>Yes, it should.</div><div><br></div><div><div>SELECT </div><div> ST_GeomFromText('POLYGON((7 7, 77 77, 35 35,7 7))') AS bad_poly,</div><div> ST_IsValid(ST_GeomFromText('POLYGON((7 7, 77 77, 35 35,7 7))')) AS bad_poly_valid,</div><div> ST_IsValidDetail(ST_GeomFromText('POLYGON((7 7, 77 77, 35 35,7 7))')) AS bad_poly_geom,</div><div> ST_IsValidReason(ST_GeomFromText('POLYGON((7 7, 77 77, 35 35,7 7))')) AS bad_poly_reason;</div></div><div><br></div><div>will report:</div><div>GEOS warning: Self-intersection at or near point 7 7<br></div><div>(as shown when called from spatialite in a terminal)</div><div><br></div><div>and as the result of ST_ValidReason: Self-intersection[7 7]</div><div><br></div><div>I cannot find a simple sample to reproduce the second error:</div><div>- Invalid number of points in LinearRing found 3 - must be 0 or >= 4</div><div><br></div><div>A simple sample that produces both errors at the same time</div><div>- could possibly show if the second error possibly interferes with the first</div><div>-- causing ST_IsValid to return TRUE, which should never happen</div><div><br></div><div>If you could supply the offending geometry in a text file (i.e. result of 'ST_AsText(geometry)'), then this could be checked.</div><div><br></div><div>Mark</div><div><br></div><div><br></div></div>