From d981bb67836cc2ae768fd0f4344509fe29b8fa45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Mon, 3 May 2021 21:47:39 +0200 Subject: [PATCH 01/10] Opt in interpolation for RobustLineIntersector --- .../jts/algorithm/RobustLineIntersector.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/core/src/main/java/org/locationtech/jts/algorithm/RobustLineIntersector.java b/modules/core/src/main/java/org/locationtech/jts/algorithm/RobustLineIntersector.java index 8f35de6947..802143e165 100644 --- a/modules/core/src/main/java/org/locationtech/jts/algorithm/RobustLineIntersector.java +++ b/modules/core/src/main/java/org/locationtech/jts/algorithm/RobustLineIntersector.java @@ -26,6 +26,22 @@ public class RobustLineIntersector extends LineIntersector { + public static String INTERPOLATE_PROPERTY_NAME = "jts.interpolate"; + public static String INTERPOLATE_PROPERTY_VALUE_TRUE = "true"; + public static String INTERPOLATE_PROPERTY_VALUE_FALSE = "false"; + public static boolean INTERPOLATE_DEFAULT = false; + private static boolean isInterpolate = INTERPOLATE_DEFAULT; + static { + setInterpolate(System.getProperty(INTERPOLATE_PROPERTY_NAME)); + } + static void setInterpolate(String interpolateCode) { + if (interpolateCode == null) + return; + isInterpolate = INTERPOLATE_DEFAULT; + if (INTERPOLATE_PROPERTY_VALUE_TRUE.equalsIgnoreCase(interpolateCode) ) + isInterpolate = true; + } + public RobustLineIntersector() { } @@ -414,6 +430,8 @@ private static double zGetOrInterpolate(Coordinate p, Coordinate p1, Coordinate * @return the interpolated Z value (may be NaN) */ private static double zInterpolate(Coordinate p, Coordinate p1, Coordinate p2) { + if (!isInterpolate) + return Double.NaN; double p1z = p1.getZ(); double p2z = p2.getZ(); if (Double.isNaN(p1z)) { From 849431e98a72c791dcd2a0d3c932bbd22a79735f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Tue, 4 May 2021 11:37:16 +0200 Subject: [PATCH 02/10] Switch interpolation on for select test cases --- .../jts/algorithm/RobustLineIntersector.java | 2 +- .../jts/algorithm/RobustLineIntersectorZTest.java | 12 +++++++++++- .../jts/geom/util/GeometryFixerTest.java | 1 + .../jts/operation/overlayng/OverlayNGZTest.java | 11 +++++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/modules/core/src/main/java/org/locationtech/jts/algorithm/RobustLineIntersector.java b/modules/core/src/main/java/org/locationtech/jts/algorithm/RobustLineIntersector.java index 802143e165..c27c329925 100644 --- a/modules/core/src/main/java/org/locationtech/jts/algorithm/RobustLineIntersector.java +++ b/modules/core/src/main/java/org/locationtech/jts/algorithm/RobustLineIntersector.java @@ -34,7 +34,7 @@ public class RobustLineIntersector static { setInterpolate(System.getProperty(INTERPOLATE_PROPERTY_NAME)); } - static void setInterpolate(String interpolateCode) { + public static void setInterpolate(String interpolateCode) { if (interpolateCode == null) return; isInterpolate = INTERPOLATE_DEFAULT; diff --git a/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java b/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java index 9d0164fbc1..50d28391aa 100644 --- a/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java @@ -33,7 +33,17 @@ public static void main(String args[]) { public RobustLineIntersectorZTest(String name) { super(name); } - + + @Override + protected void setUp() throws Exception { + RobustLineIntersector.setInterpolate("true"); + } + + @Override + protected void tearDown() throws Exception { + RobustLineIntersector.setInterpolate("false"); + } + public void testInterior() { checkIntersection( line(1, 1, 1, 3, 3, 3), line(1, 3, 10, 3, 1, 30), pt(2, 2, 11)); diff --git a/modules/core/src/test/java/org/locationtech/jts/geom/util/GeometryFixerTest.java b/modules/core/src/test/java/org/locationtech/jts/geom/util/GeometryFixerTest.java index cfd6c7d8b7..2daa686b3e 100644 --- a/modules/core/src/test/java/org/locationtech/jts/geom/util/GeometryFixerTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/geom/util/GeometryFixerTest.java @@ -11,6 +11,7 @@ */ package org.locationtech.jts.geom.util; +import org.locationtech.jts.algorithm.RobustLineIntersector; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.Point; diff --git a/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java b/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java index c7a7f887a1..fa405f1973 100644 --- a/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java @@ -11,6 +11,7 @@ */ package org.locationtech.jts.operation.overlayng; +import org.locationtech.jts.algorithm.RobustLineIntersector; import org.locationtech.jts.geom.Geometry; import junit.textui.TestRunner; @@ -25,6 +26,16 @@ public static void main(String args[]) { public OverlayNGZTest(String name) { super(name); } + + @Override + protected void setUp() throws Exception { + RobustLineIntersector.setInterpolate("true"); + } + + @Override + protected void tearDown() throws Exception { + RobustLineIntersector.setInterpolate("false"); + } public void testPointXYPointDifference() { checkDifference("MULTIPOINT ((1 1), (5 5))", "POINT Z (5 5 99)", From c02aea2b20989b5baaef4df730d7e94bd9392ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Tue, 4 May 2021 21:37:53 +0200 Subject: [PATCH 03/10] Extract option to control Z-interpolation and use also for ElevationModel --- .../jts/algorithm/RobustLineIntersector.java | 20 +--------- .../locationtech/jts/geom/ZInterpolating.java | 40 +++++++++++++++++++ .../operation/overlayng/ElevationModel.java | 5 +++ .../jts/operation/overlayng/OverlayNG.java | 2 +- .../algorithm/RobustLineIntersectorZTest.java | 5 ++- .../jts/geom/util/GeometryFixerTest.java | 2 +- .../overlayng/ElevationModelTest.java | 11 +++++ .../operation/overlayng/OverlayNGZTest.java | 6 +-- 8 files changed, 66 insertions(+), 25 deletions(-) create mode 100644 modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java diff --git a/modules/core/src/main/java/org/locationtech/jts/algorithm/RobustLineIntersector.java b/modules/core/src/main/java/org/locationtech/jts/algorithm/RobustLineIntersector.java index c27c329925..70fff839cf 100644 --- a/modules/core/src/main/java/org/locationtech/jts/algorithm/RobustLineIntersector.java +++ b/modules/core/src/main/java/org/locationtech/jts/algorithm/RobustLineIntersector.java @@ -16,6 +16,7 @@ */ import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Envelope; +import org.locationtech.jts.geom.ZInterpolating; /** * A robust version of {@link LineIntersector}. @@ -25,23 +26,6 @@ public class RobustLineIntersector extends LineIntersector { - - public static String INTERPOLATE_PROPERTY_NAME = "jts.interpolate"; - public static String INTERPOLATE_PROPERTY_VALUE_TRUE = "true"; - public static String INTERPOLATE_PROPERTY_VALUE_FALSE = "false"; - public static boolean INTERPOLATE_DEFAULT = false; - private static boolean isInterpolate = INTERPOLATE_DEFAULT; - static { - setInterpolate(System.getProperty(INTERPOLATE_PROPERTY_NAME)); - } - public static void setInterpolate(String interpolateCode) { - if (interpolateCode == null) - return; - isInterpolate = INTERPOLATE_DEFAULT; - if (INTERPOLATE_PROPERTY_VALUE_TRUE.equalsIgnoreCase(interpolateCode) ) - isInterpolate = true; - } - public RobustLineIntersector() { } @@ -430,7 +414,7 @@ private static double zGetOrInterpolate(Coordinate p, Coordinate p1, Coordinate * @return the interpolated Z value (may be NaN) */ private static double zInterpolate(Coordinate p, Coordinate p1, Coordinate p2) { - if (!isInterpolate) + if (!ZInterpolating.getZInterpolating()) return Double.NaN; double p1z = p1.getZ(); double p2z = p2.getZ(); diff --git a/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java b/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java new file mode 100644 index 0000000000..7c850787db --- /dev/null +++ b/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java @@ -0,0 +1,40 @@ +package org.locationtech.jts.geom; + +/** + * Internal class which encapsulates the runtime switch to Z-interpolate when applicable. + *

+ *

    + *
  • jts.zinterpolating=false - (default) do not Z-interpolate + *
  • jts.zinterpolating=true - Z-interpolate + *
+ * + * @author bjornharrtell + * + */ +public class ZInterpolating { + public static String ZINTERPOLATING_PROPERTY_NAME = "jts.zinterpolating"; + public static String ZINTERPOLATING_PROPERTY_VALUE_TRUE = "true"; + public static String ZINTERPOLATING_PROPERTY_VALUE_FALSE = "false"; + public static boolean ZINTERPOLATING_DEFAULT = false; + private static boolean isZInterpolating = ZINTERPOLATING_DEFAULT; + + static { + setZInterpolatingImpl(System.getProperty(ZINTERPOLATING_PROPERTY_NAME)); + } + + public static boolean getZInterpolating() { + return isZInterpolating; + } + + public static void setZInterpolating(boolean zInterpolating) { + isZInterpolating = zInterpolating; + } + + private static void setZInterpolatingImpl(String isZInterpolatingCode) { + if (isZInterpolatingCode == null) + return; + isZInterpolating = ZINTERPOLATING_DEFAULT; + if (ZINTERPOLATING_PROPERTY_VALUE_TRUE.equalsIgnoreCase(isZInterpolatingCode)) + isZInterpolating = true; + } +} diff --git a/modules/core/src/main/java/org/locationtech/jts/operation/overlayng/ElevationModel.java b/modules/core/src/main/java/org/locationtech/jts/operation/overlayng/ElevationModel.java index 653a1c0317..0f88b085c6 100644 --- a/modules/core/src/main/java/org/locationtech/jts/operation/overlayng/ElevationModel.java +++ b/modules/core/src/main/java/org/locationtech/jts/operation/overlayng/ElevationModel.java @@ -16,6 +16,7 @@ import org.locationtech.jts.geom.CoordinateSequenceFilter; import org.locationtech.jts.geom.Envelope; import org.locationtech.jts.geom.Geometry; +import org.locationtech.jts.geom.ZInterpolating; import org.locationtech.jts.math.MathUtil; /** @@ -192,6 +193,10 @@ public double getZ(double x, double y) { * @param geom the geometry to populate Z values for */ public void populateZ(Geometry geom) { + // short-circuit if ZInterpolation is globally turned off + if (!ZInterpolating.getZInterpolating()) + return; + // short-circuit if no Zs are present in model if (! hasZValue) return; diff --git a/modules/core/src/main/java/org/locationtech/jts/operation/overlayng/OverlayNG.java b/modules/core/src/main/java/org/locationtech/jts/operation/overlayng/OverlayNG.java index 8152a286e7..baccd583d1 100644 --- a/modules/core/src/main/java/org/locationtech/jts/operation/overlayng/OverlayNG.java +++ b/modules/core/src/main/java/org/locationtech/jts/operation/overlayng/OverlayNG.java @@ -486,7 +486,7 @@ else if (! inputGeom.isSingle() && inputGeom.hasPoints()) { result = computeEdgeOverlay(); } /** - * This is a no-op if the elevation model was not computed due to Z not present + * This is a no-op if the elevation model was not computed due to Z not present or if Z interpolation is turned off */ elevModel.populateZ(result); return result; diff --git a/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java b/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java index 50d28391aa..f3b07367ce 100644 --- a/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java @@ -14,6 +14,7 @@ import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.CoordinateXY; import org.locationtech.jts.geom.LineSegment; +import org.locationtech.jts.geom.ZInterpolating; import junit.textui.TestRunner; import test.jts.GeometryTestCase; @@ -36,12 +37,12 @@ public RobustLineIntersectorZTest(String name) { @Override protected void setUp() throws Exception { - RobustLineIntersector.setInterpolate("true"); + ZInterpolating.setZInterpolating(true); } @Override protected void tearDown() throws Exception { - RobustLineIntersector.setInterpolate("false"); + ZInterpolating.setZInterpolating(false); } public void testInterior() { diff --git a/modules/core/src/test/java/org/locationtech/jts/geom/util/GeometryFixerTest.java b/modules/core/src/test/java/org/locationtech/jts/geom/util/GeometryFixerTest.java index 2daa686b3e..cef76d2f8a 100644 --- a/modules/core/src/test/java/org/locationtech/jts/geom/util/GeometryFixerTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/geom/util/GeometryFixerTest.java @@ -11,10 +11,10 @@ */ package org.locationtech.jts.geom.util; -import org.locationtech.jts.algorithm.RobustLineIntersector; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.Point; +import org.locationtech.jts.geom.ZInterpolating; import junit.textui.TestRunner; import test.jts.GeometryTestCase; diff --git a/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/ElevationModelTest.java b/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/ElevationModelTest.java index e6e677894d..09ac1597c3 100644 --- a/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/ElevationModelTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/ElevationModelTest.java @@ -12,6 +12,7 @@ package org.locationtech.jts.operation.overlayng; import org.locationtech.jts.geom.Geometry; +import org.locationtech.jts.geom.ZInterpolating; import junit.textui.TestRunner; import test.jts.GeometryTestCase; @@ -24,6 +25,16 @@ public static void main(String args[]) { TestRunner.run(ElevationModelTest.class); } + @Override + protected void setUp() throws Exception { + ZInterpolating.setZInterpolating(true); + } + + @Override + protected void tearDown() throws Exception { + ZInterpolating.setZInterpolating(false); + } + public ElevationModelTest(String name) { super(name); } diff --git a/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java b/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java index fa405f1973..188dae3dc0 100644 --- a/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java @@ -11,8 +11,8 @@ */ package org.locationtech.jts.operation.overlayng; -import org.locationtech.jts.algorithm.RobustLineIntersector; import org.locationtech.jts.geom.Geometry; +import org.locationtech.jts.geom.ZInterpolating; import junit.textui.TestRunner; import test.jts.GeometryTestCase; @@ -29,12 +29,12 @@ public OverlayNGZTest(String name) { @Override protected void setUp() throws Exception { - RobustLineIntersector.setInterpolate("true"); + ZInterpolating.setZInterpolating(true); } @Override protected void tearDown() throws Exception { - RobustLineIntersector.setInterpolate("false"); + ZInterpolating.setZInterpolating(false); } public void testPointXYPointDifference() { From 1fc16a80345041352bae8a029ffa80628bcbd103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Thu, 19 Aug 2021 14:37:21 +0200 Subject: [PATCH 04/10] Add header --- .../org/locationtech/jts/geom/ZInterpolating.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java b/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java index 7c850787db..5c4ce08137 100644 --- a/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java +++ b/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2021 Björn Harrtell. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * and Eclipse Distribution License v. 1.0 which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v20.html + * and the Eclipse Distribution License is available at + * + * http://www.eclipse.org/org/documents/edl-v10.php. + */ + package org.locationtech.jts.geom; /** From 5ce448db7e04d5fa7849439c5c7196adcce94918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Fri, 28 Oct 2022 09:30:55 +0200 Subject: [PATCH 05/10] Default to Z-interpolate true --- .../src/main/java/org/locationtech/jts/geom/ZInterpolating.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java b/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java index 5c4ce08137..6d1dc90877 100644 --- a/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java +++ b/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java @@ -27,7 +27,7 @@ public class ZInterpolating { public static String ZINTERPOLATING_PROPERTY_NAME = "jts.zinterpolating"; public static String ZINTERPOLATING_PROPERTY_VALUE_TRUE = "true"; public static String ZINTERPOLATING_PROPERTY_VALUE_FALSE = "false"; - public static boolean ZINTERPOLATING_DEFAULT = false; + public static boolean ZINTERPOLATING_DEFAULT = true; private static boolean isZInterpolating = ZINTERPOLATING_DEFAULT; static { From 713f65092702d1ded9a0374cfcf6148c3ea690b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Fri, 28 Oct 2022 09:48:46 +0200 Subject: [PATCH 06/10] Fix license --- .../main/java/org/locationtech/jts/geom/ZInterpolating.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java b/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java index 6d1dc90877..d148a5fced 100644 --- a/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java +++ b/modules/core/src/main/java/org/locationtech/jts/geom/ZInterpolating.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Björn Harrtell. + * Copyright (c) 2016 Vivid Solutions. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -9,7 +9,6 @@ * * http://www.eclipse.org/org/documents/edl-v10.php. */ - package org.locationtech.jts.geom; /** From fc1690bb2ab0c25a0348165024eedb8949728013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Fri, 28 Oct 2022 09:51:45 +0200 Subject: [PATCH 07/10] Remove obsolete overrides --- .../jts/algorithm/RobustLineIntersectorZTest.java | 10 ---------- .../jts/operation/overlayng/ElevationModelTest.java | 10 ---------- .../jts/operation/overlayng/OverlayNGZTest.java | 10 ---------- 3 files changed, 30 deletions(-) diff --git a/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java b/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java index f3b07367ce..5bfd28b184 100644 --- a/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java @@ -35,16 +35,6 @@ public RobustLineIntersectorZTest(String name) { super(name); } - @Override - protected void setUp() throws Exception { - ZInterpolating.setZInterpolating(true); - } - - @Override - protected void tearDown() throws Exception { - ZInterpolating.setZInterpolating(false); - } - public void testInterior() { checkIntersection( line(1, 1, 1, 3, 3, 3), line(1, 3, 10, 3, 1, 30), pt(2, 2, 11)); diff --git a/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/ElevationModelTest.java b/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/ElevationModelTest.java index 09ac1597c3..a1b7dd21d1 100644 --- a/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/ElevationModelTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/ElevationModelTest.java @@ -25,16 +25,6 @@ public static void main(String args[]) { TestRunner.run(ElevationModelTest.class); } - @Override - protected void setUp() throws Exception { - ZInterpolating.setZInterpolating(true); - } - - @Override - protected void tearDown() throws Exception { - ZInterpolating.setZInterpolating(false); - } - public ElevationModelTest(String name) { super(name); } diff --git a/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java b/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java index 188dae3dc0..2e94b57339 100644 --- a/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java @@ -26,16 +26,6 @@ public static void main(String args[]) { public OverlayNGZTest(String name) { super(name); } - - @Override - protected void setUp() throws Exception { - ZInterpolating.setZInterpolating(true); - } - - @Override - protected void tearDown() throws Exception { - ZInterpolating.setZInterpolating(false); - } public void testPointXYPointDifference() { checkDifference("MULTIPOINT ((1 1), (5 5))", "POINT Z (5 5 99)", From 489c40c25ea6b34d01d63b2dc602c179649d3f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Fri, 28 Oct 2022 09:52:40 +0200 Subject: [PATCH 08/10] Remove unused imports --- .../locationtech/jts/algorithm/RobustLineIntersectorZTest.java | 1 - .../locationtech/jts/operation/overlayng/ElevationModelTest.java | 1 - .../org/locationtech/jts/operation/overlayng/OverlayNGZTest.java | 1 - 3 files changed, 3 deletions(-) diff --git a/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java b/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java index 5bfd28b184..d6f3f16d44 100644 --- a/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java @@ -14,7 +14,6 @@ import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.CoordinateXY; import org.locationtech.jts.geom.LineSegment; -import org.locationtech.jts.geom.ZInterpolating; import junit.textui.TestRunner; import test.jts.GeometryTestCase; diff --git a/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/ElevationModelTest.java b/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/ElevationModelTest.java index a1b7dd21d1..e6e677894d 100644 --- a/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/ElevationModelTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/ElevationModelTest.java @@ -12,7 +12,6 @@ package org.locationtech.jts.operation.overlayng; import org.locationtech.jts.geom.Geometry; -import org.locationtech.jts.geom.ZInterpolating; import junit.textui.TestRunner; import test.jts.GeometryTestCase; diff --git a/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java b/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java index 2e94b57339..c7a7f887a1 100644 --- a/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/operation/overlayng/OverlayNGZTest.java @@ -12,7 +12,6 @@ package org.locationtech.jts.operation.overlayng; import org.locationtech.jts.geom.Geometry; -import org.locationtech.jts.geom.ZInterpolating; import junit.textui.TestRunner; import test.jts.GeometryTestCase; From 6a2434caa4cef9bc1d2ed53d4bd1caa6b9163e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Fri, 28 Oct 2022 09:53:18 +0200 Subject: [PATCH 09/10] One more --- .../java/org/locationtech/jts/geom/util/GeometryFixerTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/core/src/test/java/org/locationtech/jts/geom/util/GeometryFixerTest.java b/modules/core/src/test/java/org/locationtech/jts/geom/util/GeometryFixerTest.java index cef76d2f8a..cfd6c7d8b7 100644 --- a/modules/core/src/test/java/org/locationtech/jts/geom/util/GeometryFixerTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/geom/util/GeometryFixerTest.java @@ -14,7 +14,6 @@ import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.Point; -import org.locationtech.jts.geom.ZInterpolating; import junit.textui.TestRunner; import test.jts.GeometryTestCase; From ce88968624bf01bd390067c1cdcf4acfc40951c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Fri, 28 Oct 2022 09:54:04 +0200 Subject: [PATCH 10/10] Revert change --- .../locationtech/jts/algorithm/RobustLineIntersectorZTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java b/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java index d6f3f16d44..9d0164fbc1 100644 --- a/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java +++ b/modules/core/src/test/java/org/locationtech/jts/algorithm/RobustLineIntersectorZTest.java @@ -33,7 +33,7 @@ public static void main(String args[]) { public RobustLineIntersectorZTest(String name) { super(name); } - + public void testInterior() { checkIntersection( line(1, 1, 1, 3, 3, 3), line(1, 3, 10, 3, 1, 30), pt(2, 2, 11));