diff --git a/modules/core/src/main/java/org/locationtech/jts/operation/union/CascadedPolygonUnion.java b/modules/core/src/main/java/org/locationtech/jts/operation/union/CascadedPolygonUnion.java index 38476e89db..58efb6a748 100644 --- a/modules/core/src/main/java/org/locationtech/jts/operation/union/CascadedPolygonUnion.java +++ b/modules/core/src/main/java/org/locationtech/jts/operation/union/CascadedPolygonUnion.java @@ -363,14 +363,7 @@ private Geometry unionSafe(Geometry g0, Geometry g1) */ private Geometry unionActual(Geometry g0, Geometry g1) { - Geometry union; - - if (unionFun.isFloatingPrecision()) { - union = OverlapUnion.union(g0, g1, unionFun); - } - else { - union = unionFun.union(g0, g1); - } + Geometry union = unionFun.union(g0, g1); Geometry unionPoly = restrictToPolygons( union ); return unionPoly; } diff --git a/modules/core/src/main/java/org/locationtech/jts/operation/union/OverlapUnion.java b/modules/core/src/main/java/org/locationtech/jts/operation/union/OverlapUnion.java index d841b16791..9112503dd1 100644 --- a/modules/core/src/main/java/org/locationtech/jts/operation/union/OverlapUnion.java +++ b/modules/core/src/main/java/org/locationtech/jts/operation/union/OverlapUnion.java @@ -74,8 +74,14 @@ * but it could happen due to snapping. It has been observed * in other APIs (e.g. GEOS) due to more aggressive snapping. * It is more likely to happen if a Snap-Rounding overlay is used. + *
+ * NOTE: Test has shown that using this heuristic impairs performance. + * It has been removed from use. + * * * @author mbdavis + * + * @deprecated due to impairing performance * */ public class OverlapUnion