You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by kw...@apache.org on 2018/04/11 06:55:01 UTC

lucene-solr:branch_7x: LUCENE-8245: Handle parallel planes case properly.

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x b10dc030b -> 2376b6c51


LUCENE-8245: Handle parallel planes case properly.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/2376b6c5
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/2376b6c5
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/2376b6c5

Branch: refs/heads/branch_7x
Commit: 2376b6c51c4fa7bb4ae8c1dfa04b1704a0d9f37a
Parents: b10dc03
Author: Karl Wright <Da...@gmail.com>
Authored: Wed Apr 11 02:53:51 2018 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Wed Apr 11 02:54:53 2018 -0400

----------------------------------------------------------------------
 .../java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.java  | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2376b6c5/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.java
index 3c63559..5e362f2 100644
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.java
@@ -603,6 +603,9 @@ class GeoComplexPolygon extends GeoBasePolygon {
     //System.out.println(" Computing crossings between "+envelopePlane+" and ["+edge.startPoint+"->"+edge.endPoint+"]");
     
     final GeoPoint[] unboundedIntersectionPoints = envelopePlane.findIntersections(planetModel, edge.plane);
+    if (unboundedIntersectionPoints == null) {
+      return null;
+    }
     // Go through the intersection points one at a time.  Notes:
     // (1) So that we don't double-count, we can only include at most one point in the result per intersection.
     // (2) Single-solution results imply that the plane was not crossed.  The only time we consider them is if the edge ends on the plane, in which case we count it as a crossing.