Well, I will explain you why I have this weird geometry.<br><br>The application I&#39;m coding uses 2 esri shapefiles, one of them is huge, it&#39;s the size of Mexico, and the shape of it is very similar to Mexico. It&#39;s a huge multipolygon 24M in size.<br>
<br>Then I have another shapefile, the size of a city, this one is made of many polygons and it&#39;s smaller.<br><br>I have to calculate the intersection percent between the first and the second shapes.<br><br>To do this I convert both shapefiles to WKT, so I end up with a huge WKT 54M in size from the first shapefile and many small WKT&#39;s from the second one.<br>
<br>Problems start with the first shape, the huge one, having lots of self-intersections. I tried to &quot;fix&quot; it by doing a GEOSbuffer on it, but after some calculations, GEOSBuffer fails with an error I don&#39;t remember.<br>
<br>After that I tried spliting the huge WKT multipolygon into many smaller WKT polygons, and applying a GEOSBuffer to each one of them when needed, but this doesn&#39;t work either because many of the resulting polygons are screwed up, and I can&#39;t discard any of them. Also there is no way I can get a shapefile with a valid multipolygon inside it, I have to find a way to make it usable for GEOSIntersection.<br>
<br><div class="gmail_quote">2008/4/28 Martin Davis &lt;<a href="mailto:mbdavis@refractions.net">mbdavis@refractions.net</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
When I look at the geometry fragment you provided, the &quot;hole&quot; actually lies completely outside the shell. &nbsp;If the other holes are the same, then buffer just removes them entirely.<br>
<br>
In other words, buffer is behaving according to spec - it&#39;s just that your input geometry is too munged to be fixed by buffer. &nbsp;8^)<br>
<br>
Maximo Pech wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
Hi, I&#39;m having trouble with a geometry in WKT form, it begins like this:<br>
<br>
POLYGON ((-97.3813520229492866 26.0028241269227607, -97.3813272725338663 26.0046293743595065, -97.3793295485156989 26.0046069937576725, -97.3793543294448654 26.0028017481029394, -97.3813520229492866 26.0028241269227607), (-97.3813520229492866 26.0028241269227607, -97.3813767710094567 26.0010188790133867, -97.3793791080158968 26.0009965019755249, -97.3773814473803014 26.0009740973626933, -97.3753837891055838 26.0009516651750232, -97.3753589495133269 26.0027569077319392, -97.3753341075571370 26.00456214981606...<br>

<br>
It&#39;s a polygon with many rings inside it. I&#39;m trying to buffer it to make a intersection operation with a lot of other geometries because GEOS says it has a self-intersection at or near point -97.3814 26.0028, but after buffering it my geometry becomes:<br>

<br>
POLYGON ((-97.3813520229492866 26.0028241269227607, -97.3813272725338663 26.0046293743595065, -97.3793295485156989 26.0046069937576725, -97.3793543294448654 26.0028017481029394, -97.3813520229492866 26.0028241269227607))<br>

<br>
All of the remaining rings are gone.<br></div></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org" target="_blank">geos-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geos-devel" target="_blank">http://lists.osgeo.org/mailman/listinfo/geos-devel</a><br>
</blockquote>
<br>
-- <br>
Martin Davis<br>
Senior Technical Architect<br>
Refractions Research, Inc.<br>
(250) 383-3022<br>
<br>
_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org" target="_blank">geos-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geos-devel" target="_blank">http://lists.osgeo.org/mailman/listinfo/geos-devel</a><br>
</blockquote></div><br>