[postgis-devel] ST_Normalize issues (was ST_Reverse issues)

Sandro Santilli strk at kbt.io
Thu Jun 24 08:56:12 PDT 2021


I went looking to file a ticket and SURPRISE, I already filed a ticket
for this 3 months ago:

    https://trac.osgeo.org/geos/ticket/1109

Comments about the proposed solutions in there ?

--strk;


On Thu, Jun 24, 2021 at 05:44:46PM +0200, Sandro Santilli wrote:
> On Thu, Jun 24, 2021 at 08:36:25AM -0700, Paul Ramsey wrote:
> > https://github.com/libgeos/geos/blame/main/src/geom/LineString.cpp#L320
> > 
> > It means that for closed rings, the starting point is set to the lowest (? uniqueCoordinates->minCoordinate()) coordinate and the ring orientation is forced to CW. 
> > And I was wrong about the why, it was not for PostGIS regression, which I guess had few enough tests and didn't exercise the overlay differences very hard, it was for GEOS regression in the period when both overlay engines were fully in play.
> > Why make such a change? I didn't think normalize was used for anything other than regression tests, so it seemed not unreasonable to add this extra set of rules for this narrow case in order to achieve consistency in the tests between overlay engines.
> > To the extent that the old overlay engine is considered completely deprecated, the normalize behaviour could be removed and the tests updated to match the outputs of the NG engine. That wasn't really quite the head space we were in, even when releasing 3.9, so the more invasive normalize went into release as well.
> 
> The problem I'm having is actually that I *am* using it for regression
> tests, but the tests are running against both GEOS-3.8 and GEOS-3.9,
> so they always fail in one case and succeed in the other case.
> 
> The concept of a "canonincal form" was meant exactly to avoid this.
> This change is basically changing the "canonical form", which makes
> it useless (not canonical anymore). This is for projects which *use*
> PostGIS but are not part of it.
> 
> --strk;



More information about the postgis-devel mailing list