diff --git a/modules/core/src/main/java/org/locationtech/jts/operation/relateng/IMPredicate.java b/modules/core/src/main/java/org/locationtech/jts/operation/relateng/IMPredicate.java index eb356f5a51..8612e4496a 100644 --- a/modules/core/src/main/java/org/locationtech/jts/operation/relateng/IMPredicate.java +++ b/modules/core/src/main/java/org/locationtech/jts/operation/relateng/IMPredicate.java @@ -64,7 +64,7 @@ protected int valuePartial() { return TopologyPredicateValue.UNKNOWN; } - protected void requireCovers(Envelope a, Envelope b) { + protected void setRequireCovers(Envelope a, Envelope b) { setRequire(a.covers(b)); } diff --git a/modules/core/src/main/java/org/locationtech/jts/operation/relateng/TopologyBuilder.java b/modules/core/src/main/java/org/locationtech/jts/operation/relateng/TopologyBuilder.java index c4e7f32a30..894c6d3892 100644 --- a/modules/core/src/main/java/org/locationtech/jts/operation/relateng/TopologyBuilder.java +++ b/modules/core/src/main/java/org/locationtech/jts/operation/relateng/TopologyBuilder.java @@ -132,17 +132,18 @@ public boolean isSelfNodingRequired() { * @param dimension * @return true if the value of the predicate changed */ - private boolean updateDim(int locA, int locB, int dimension) { + private void updateDim(int locA, int locB, int dimension) { predicate.updateDim(locA, locB, dimension); - return true; } - private boolean updateDim(boolean isAB, int loc1, int loc2, int dimension) { + private void updateDim(boolean isAB, int loc1, int loc2, int dimension) { if (isAB) { - return updateDim(loc1, loc2, dimension); + updateDim(loc1, loc2, dimension); + } + else { + // is ordered BA + updateDim(loc2, loc1, dimension); } - // is ordered BA - return updateDim(loc2, loc1, dimension); } public boolean isResultKnown() { diff --git a/modules/core/src/main/java/org/locationtech/jts/operation/relateng/TopologyPredicateFactory.java b/modules/core/src/main/java/org/locationtech/jts/operation/relateng/TopologyPredicateFactory.java index 36f8ce0c56..59f0e82544 100644 --- a/modules/core/src/main/java/org/locationtech/jts/operation/relateng/TopologyPredicateFactory.java +++ b/modules/core/src/main/java/org/locationtech/jts/operation/relateng/TopologyPredicateFactory.java @@ -78,7 +78,7 @@ public void init(int dimA, int dimB) { @Override public void init(Envelope envA, Envelope envB) { - requireCovers(envA, envB); + setRequireCovers(envA, envB); } @Override @@ -106,7 +106,7 @@ public void init(int dimA, int dimB) { @Override public void init(Envelope envA, Envelope envB) { - requireCovers(envA, envB); + setRequireCovers(envA, envB); } @Override @@ -134,7 +134,7 @@ public void init(int dimA, int dimB) { @Override public void init(Envelope envA, Envelope envB) { - requireCovers(envB, envA); + setRequireCovers(envB, envA); } @Override @@ -160,7 +160,7 @@ public void init(int dimA, int dimB) { @Override public void init(Envelope envA, Envelope envB) { - requireCovers(envB, envA); + setRequireCovers(envB, envA); } @Override