Hi Regina and Leo,<div><br></div><div>My version is: "POSTGIS="1.5.0" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.6.1, 21 August 2008" LIBXML="2.7.6" USE_STATS"</div><div>PostgreSQL 8.4 running on a WINXP</div>
<div><br></div><div>I was playing with the ST_IsValid() function and the ST_IsValidReason().</div><div><br></div><div>What I notice is the geometry, of course, is not valid. Reason: "Self-intersection[-6.4825e+006 -3.15411e+006]"</div>
<div><br></div><div>I have other 96 invalid geometries in a table of 22k records.</div><div>From those 96, only 1 has the Self-intersection invalid reason. </div><div>The rest of them have a Ring Self-intersection. These last dont through an error exception, only the one with the "Self-intersection" error does.</div>
<div><br></div><div>I guess I should do propper geometry validation first.</div><div><br></div><div>Regards</div><div><br></div><div><br><br><div class="gmail_quote">On Wed, Aug 18, 2010 at 1:38 AM, Paragon Corporation <span dir="ltr"><<a href="mailto:lr@pcorp.us">lr@pcorp.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



<div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Ricardo,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">If you are looking in PgAdmin III, it won't show the geometry 
if it is too big.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">You should verify that your multipolygon is valid.  Many 
of the GEOS functions won't work with invalid polygons.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">SELECT ST_IsValid(yourgeometryhere)</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Also let us know which version of GEOS you are 
using</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">SELECT postgis_full_version();</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Lots of topology exception issues have been fixed in newer 
versions of GEOS so upgrading might fix your problem if you are running a GEOS 
version older than 3.2</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Hope that helps,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Regina and Leo</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"><a href="http://www.postgis.us" target="_blank">http://www.postgis.us</a></font></span></div><br>
<div dir="ltr" lang="en-us" align="left">
<hr>
<font size="2" face="Tahoma"><b>From:</b> 
<a href="mailto:postgis-users-bounces@postgis.refractions.net" target="_blank">postgis-users-bounces@postgis.refractions.net</a> 
[mailto:<a href="mailto:postgis-users-bounces@postgis.refractions.net" target="_blank">postgis-users-bounces@postgis.refractions.net</a>] <b>On Behalf Of 
</b>Ricardo Bayley<br><b>Sent:</b> Wednesday, August 18, 2010 12:06 
AM<br><b>To:</b> <a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br><b>Subject:</b> 
[postgis-users] GEOS pointonsurface() threw an error!<br></font><br></div><div><div></div><div class="h5">
<div></div>Hi,
<div><br></div>
<div>I am calculation the PointOnSurface for a table of polygons. I get this 
error message</div>
<div><br></div>
<div><br></div>
<div>
<div>NOTICE:  TopologyException: found non-noded intersection between 
LINESTRING (857703 1.04022e+006, 857648 1.04019e+006) and LINESTRING (857536 
1.04019e+006, 857870 1.04019e+006) at 857648 1.04019e+006</div>
<div><br></div>
<div><br></div>
<div>ERROR:  GEOS pointonsurface() threw an error!</div>
<div><br></div>
<div>********** Error **********</div>
<div><br></div>
<div>ERROR: GEOS pointonsurface() threw an error!</div>
<div>Estado SQL:XX000</div></div>
<div><br></div>
<div>I checked the one of the rows that is getting this error with 
ST_GeometryType and I get "ST_Multipolygon", although I dont get the ST_AsText, 
or any output type.</div>
<div>Any ideas why ? </div>
<div><br></div>
<div><br></div>
<div>regards</div>
<div><br></div>
<div><br></div>
<div>Ricardo</div>
<div><br></div>
<div><br></div></div></div></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div>