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:32 UTC
lucene-solr:branch_6x: LUCENE-8245: Handle parallel planes case
properly.
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6x 6f68f74f7 -> 1f622d93d
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/1f622d93
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1f622d93
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1f622d93
Branch: refs/heads/branch_6x
Commit: 1f622d93dcad8ee5f2e1f772408201e077dc16c2
Parents: 6f68f74
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:55:26 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/1f622d93/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.