[postgis-devel] Why delegating MakeValid to GEOS ?

Sandro Santilli strk at kbt.io
Thu Dec 10 13:19:30 PST 2020


On Thu, Dec 10, 2020 at 12:48:08PM -0800, Paul Ramsey wrote:
> > On Dec 10, 2020, at 12:41 PM, Sandro Santilli <strk at kbt.io> wrote:
> > 
> > Is there a good reason to delegate ST_MakeValid
> > to GEOSMakeValid, when available ?
> 
> So that we eventually end up with all the behaviour in the same place?

Eventually would be when we drop support for older GEOS. It's not yet
the time, is it ?

> > I'm asking because while changing ST_MakeValid to
> > handle NaN I find myself having to do the same changes
> > both in PostGIS and GEOS for people running older GEOS.
> 
> If you don't then we instead end up at a place where swapping implementations results in sudden behaviour change, which is Also Bad.

True. I'll check how does the GEOS side behaves, chances are
it already does NaN stripping (it doens't help that the _unit_
test for GEOS makevalid was left out of autotools build scripts).

> > How about keeping it all in PostGIS always until we drop
> > support for older GEOS versions ?
> 
> Minimize the long term Badness by doing the Extra Work this problem requires.

What do you mean ? Drop support for old GEOS now ?

--strk;


More information about the postgis-devel mailing list