<div dir="ltr"><div>That's a good summary of the difference between the two approaches.</div><div><br></div><div>There are some illustrations of the difference on the PR:  <a href="https://github.com/libgeos/geos/pull/433#issuecomment-821597724">https://github.com/libgeos/geos/pull/433#issuecomment-821597724</a></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 18, 2021 at 11:15 AM Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On Apr 18, 2021, at 7:17 AM, Darafei Komяpa Praliaskouski <<a href="mailto:me@komzpa.net" target="_blank">me@komzpa.net</a>> wrote:<br>
> <br>
> If you drop it in instead of MakeValid, will tests complain?<br>
<br>
Yes, they are philosophically quite different, so in many cases the results will be quite different. If I can try and summarize very very very roughly, and I apologize in advance, the philosophies are (mostly applying to polygonal validity):<br>
<br>
MakeValid: Take all the rings and smash them together. Now pull the "best" polygon you can out of that collection of lines. An upside of this approach is that you can generate resultants that preserve every input vertex (a design requirement of the organization that contracted the original work).<br>
<br>
FixGeometry: Exterior rings and interior rings perform different purposes. Exerior rings bound areas, interior rings subtract from those areas. Merge exterior rings, merge interior rings, subtract interior from exterior areas. Vertexes will definitely disappear (because they'll be inside bounded areas, and thus not relevant). <br>
<br>
Anyways, all that to say, unlike the overlay code, this is not a 99%-the-same change, quite a lot of common cases will result in different answers. Martin's drawing up a gallery, but the original document captures the *flavour* of it, if not exactly, because the behaviour of buffer(0) is similar to the behaviour of GeometryFix, modulo some cases that simple buffer(0) falls on its face with (figure 8's for example). <br>
<br><br>
</blockquote></div></div>