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

Paul Ramsey pramsey at cleverelephant.ca
Thu Jun 24 08:36:25 PDT 2021


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.
P.

> On Jun 24, 2021, at 8:23 AM, Sandro Santilli <strk at kbt.io> wrote:
> 
> On Thu, Jun 24, 2021 at 08:17:04AM -0700, Paul Ramsey wrote:
>> The linestrings that are output from an OverlayNG Union operation are not necessarily oriented the same as those output by an old style Overlay, and in order to harmonize regression results when bringing in GEOS 3.9 (NG) with results run against older GEOS, normalize was made more stringent.
> 
> What does it mean, exactly, for Normalize to being more stringent ?
> How did it change ? Where is it documented ?
> 
> --strk;
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list