Open FObermaier opened 3 years ago
Thanks, will look at this ASAP.
The idea of using OverlayNGRobust.union(Geometry)
in the case of a Floating PrecisionModel makes sense.
This might also reveal a bug in GeometryStrategy.union(Geometry)
- not sure it uses a fixed PrecisionModel even if the Geometry PM is fixed.
In JTS UnaryUnionOp
there is a warning that it works only for fixed-precision inputs, and that OverlayNGRobust
should be used in that case.
I'm leery of promoting too many alternative code paths through the overlay code. It's confusing enough as it is. I guess this really requires an IllegalArgumentException
to be thrown, however.
The following issue was reported for NTS: https://github.com/NetTopologySuite/NetTopologySuite/issues/531
Possible fixes are:
PrecisionModel
s as arguments toUnaryUnionNG(Collection<Geometry>, PrecisionModel)
andUnaryUnionNG(Collection<Geometry>, GeometryFactory, PrecisionModel)
UnionStrategy
that delegates toOverlayNGRobust.overlay(g0, g1, UNION)