diff --git a/modules/core/src/test/java/org/locationtech/jts/simplify/DouglasPeuckerSimplifierTest.java b/modules/core/src/test/java/org/locationtech/jts/simplify/DouglasPeuckerSimplifierTest.java index df940a62df..bfd8f56b82 100644 --- a/modules/core/src/test/java/org/locationtech/jts/simplify/DouglasPeuckerSimplifierTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/simplify/DouglasPeuckerSimplifierTest.java @@ -53,8 +53,8 @@ public void testPolygonReductionWithSplit() { public void testPolygonReduction() { checkDP("POLYGON ((120 120, 121 121, 122 122, 220 120, 180 199, 160 200, 140 199, 120 120))", - 10.0, - "POLYGON ((120 120, 220 120, 180 199, 160 200, 140 199, 120 120)))"); + 10, + "POLYGON ((120 120, 220 120, 180 199, 160 200, 140 199, 120 120))"); } public void testPolygonWithTouchingHole() { diff --git a/modules/core/src/test/java/org/locationtech/jts/simplify/TopologyPreservingSimplifierTest.java b/modules/core/src/test/java/org/locationtech/jts/simplify/TopologyPreservingSimplifierTest.java index 06cdceca71..4e36250216 100644 --- a/modules/core/src/test/java/org/locationtech/jts/simplify/TopologyPreservingSimplifierTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/simplify/TopologyPreservingSimplifierTest.java @@ -158,6 +158,11 @@ public void testLinearRingRemoveEndpoint() throws Exception { ); } + public void testPolygonKeepFlatEndpointWithTouch() throws Exception { + checkTPSNoChange("POLYGON ((0 0, 5 2.05, 10 0, 10 10, 0 10, 0 0), (5 2.1, 6 2, 6 4, 4 4, 4 2, 5 2.1))", + 0.1 ); + } + public void testPolygonKeepEndpointWithCross() throws Exception { checkTPS( "POLYGON ((50 52, 60 50, 90 60, 90 10, 10 10, 10 90, 60 90, 50 55, 40 80, 20 60, 40 50, 50 52))",