We&#39;re using GDAL and GEOS in MapWindow GIS and we use the GEOS version of IsValid(). I think it is the same GDAL is using.<br>The latest version of GEOS has a IsValidReason, telling you what was wrong.<br><br>I hope it helps,<br>

<br><span style="color: black;"><div dir="ltr"><div><span style="font-family: arial,helvetica,sans-serif;">Thanks,<br><br>Paul<br><br>--</span><br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">Paul Meems</span><br style="font-family: arial,helvetica,sans-serif;">

<span style="font-family: arial,helvetica,sans-serif;">Release manager, configuration manager</span><br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">and forum 
moderator of MapWindow GIS.</span><br style="font-family: arial,helvetica,sans-serif;"><a href="http://www.mapwindow.org/"><span style="font-family: arial,helvetica,sans-serif;">www.mapwindow.org</span></a><br style="font-family: arial,helvetica,sans-serif;">

<br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">Owner of 
MapWindow.nl - Support for</span><br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">Dutch speaking users.</span><br style="font-family: arial,helvetica,sans-serif;">

<a href="http://www.mapwindow.nl/"><span style="font-family: arial,helvetica,sans-serif;">www.mapwindow.nl</span></a><br style="font-family: arial,helvetica,sans-serif;"></div><div style="padding: 5px 0pt; font-family: arial,sans-serif; font-size: 13.3px;">

<a href="http://nl.linkedin.com/in/paulmeems" style="padding: 0pt 2px; color: blue; font-size: 10pt;"><img src="http://www.images.wisestamp.com/linkedin.png" alt="Linkedin" style="vertical-align: middle; padding-bottom: 5px;" border="0" height="16" width="16"></a><a href="http://twitter.com/mapwindow_nl" style="padding: 0pt 2px; color: blue; font-size: 10pt;"><img src="http://www.images.wisestamp.com/twitter.png" alt="Twitter" style="vertical-align: middle; padding-bottom: 5px;" border="0" height="16" width="16"></a></div>

</div></span><br><br><br><div class="gmail_quote">2010/6/10 Peter Freimuth <span dir="ltr">&lt;<a href="mailto:pfreimuth@arcor.de">pfreimuth@arcor.de</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Hi List,<br>
i am working with python ogr api and i check features which the<br>
applications gets from esri shapefiles to match several criterias.<br>
        if not xOgrGeometry.IsValid():<br>
            sMsg = &quot;IsValid check failed! We have an invalid feature<br>
geometry!&quot;<br>
            wkt=xOgrGeometry.ExportToWkt()<br>
            xLogger.error(sMsg + &quot;Geometry is: [%s]&quot; % wkt)<br>
            return [0, sMsg]<br>
It would be great if there is a possibility to get the reason for why<br>
is_valid() failed. I checked also shapely but i could&#39;nt find something<br>
that tells me the reason like selfintersecting or other.<br>
<br>
Any hint on how to extract the reason string is welcome.<br>
<br>
Kind regards,<br>
Peter<br>
<font color="#888888"><br>
--<br>
Peter Freimuth<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</font></blockquote></div><br>