[postgis-devel] ST_MakeValid() behaviour
mtnclimb at gmail.com
Sun Apr 18 20:20:12 PDT 2021
That's a good summary of the difference between the two approaches.
There are some illustrations of the difference on the PR:
On Sun, Apr 18, 2021 at 11:15 AM Paul Ramsey <pramsey at cleverelephant.ca>
> > On Apr 18, 2021, at 7:17 AM, Darafei Komяpa Praliaskouski <me at komzpa.net>
> > If you drop it in instead of MakeValid, will tests complain?
> 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):
> 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).
> 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).
> 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).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-devel