diff --git a/modules/core/src/main/java/org/locationtech/jts/operation/relateng/RelateNG.java b/modules/core/src/main/java/org/locationtech/jts/operation/relateng/RelateNG.java index 977fd75637..fa3ee65696 100644 --- a/modules/core/src/main/java/org/locationtech/jts/operation/relateng/RelateNG.java +++ b/modules/core/src/main/java/org/locationtech/jts/operation/relateng/RelateNG.java @@ -320,7 +320,11 @@ private void computeAtPoints(RelateGeometry geom, boolean isA, * if it has areas OR if the predicate requires checking for * exterior interaction. * In particular, this avoids testing line ends against lines - * for the intersects predicate. + * for the intersects predicate (since these are checked + * during segment/segment intersection checking anyway). + * Checking points against areas is necessary, since the input + * linework may be entirely disjoint if one input lies wholly + * inside an area. */ boolean checkDisjointPoints = geomTarget.hasDimension(Dimension.A) || topoComputer.isExteriorCheckRequired(isA); diff --git a/modules/core/src/main/java/org/locationtech/jts/operation/relateng/TopologyPredicate.java b/modules/core/src/main/java/org/locationtech/jts/operation/relateng/TopologyPredicate.java index 639427ede9..53f7750f20 100644 --- a/modules/core/src/main/java/org/locationtech/jts/operation/relateng/TopologyPredicate.java +++ b/modules/core/src/main/java/org/locationtech/jts/operation/relateng/TopologyPredicate.java @@ -52,9 +52,13 @@ default boolean requiresSelfNoding() { /** * Reports whether this predicate requires checking if the source input intersects * the Exterior of the target input. - * This allows some performance optimizations if not required. + * This is the case if: + *
+   * IM[Int(Src), Ext(Tgt)] >= 0 or IM[Bdy(Src), Ext(Tgt)] >= 0
+   * 
+ * When not required to evaluate a predicate this permits performance optimization. * - * @param isSourceA + * @param isSourceA flag indicating which input geometry is the source * @return true if the predicate requires checking whether the source intersects the target exterior */ default boolean requiresExteriorCheck(boolean isSourceA) {