[postgis-devel] ST_MakeValid() behaviour

Darafei "Komяpa" Praliaskouski me at komzpa.net
Sun Apr 18 07:17:01 PDT 2021

If you drop it in instead of MakeValid, will tests complain?

If none complain or the difference is minor (up to normalization), just
replace it.

If the differences are within the documented description, ("does not lose
vertices" etc), then replace it. Edge cases of "vertex at infinity" can be
lost IMO.

If differences are bigger, let's have a look at them together. I've looked
at the doc and haven't found an issue via quick look, but maybe we need to
play a bit more.

I'd say a good way to check it will be to run a fuzzer that gets fuzz data,
parses as wkb, runs IsValid, runs MakeValid, runs IsValid on output of that
and fails if the final result is not valid.

On Sun, Apr 18, 2021 at 3:17 PM Sandro Santilli <strk at kbt.io> wrote:

> On Sat, Apr 17, 2021 at 10:12:14AM -0700, Paul Ramsey wrote:
> > Coming soon to GEOS 3.10 is a new implementation of a "validity
> repairer", currently named GeometryFixer.
> >
> > https://github.com/libgeos/geos/pull/433
> >
> > Open question is whether to bind the GEOS default GEOSMakeValid() CAPI
> to it. It provides (we think, arguably) more "expected" outputs for various
> invalid cases, and is almost certainly faster than the existing
> implementation. On the other hand, it's *different*, so people would get
> different results from ST_MakeValid() depending on the GEOS version under
> their PostGIS.
> >
> > We could still leave the old algorithm *accessible*, via extra
> parameters and knobs and switches, as Dan notes in a comment on the PR.
> Question is, can we switch out the default behaviour, or are we going to
> end up with ST_MakeValid() and ST_GeometryFix() (or something).
> How about implementing options ?
> Ideally the options would express the difference in behavior, so that
> the user specifies which behavior she wants. Can such differences be
> expressed in a clear way ?
> --strk;
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel

Darafei "Komяpa" Praliaskouski
OSM BY Team - http://openstreetmap.by/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20210418/460b66dc/attachment.html>

More information about the postgis-devel mailing list