You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by th...@apache.org on 2016/04/14 01:22:02 UTC

[46/50] lucene-solr:jira/SOLR-8908: Disable GeoConvexPolygon and GeoConcavePolygon sanity checks, since these are now package private and the check happens in GeoPolygonFactory anyway.

Disable GeoConvexPolygon and GeoConcavePolygon sanity checks, since these are now package private and the check happens in GeoPolygonFactory anyway.


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

Branch: refs/heads/jira/SOLR-8908
Commit: 6e5ec3bb4cfe8b74a89ddc4243d0b45e6f0cd4e9
Parents: 69f3d1f
Author: Karl Wright <Da...@gmail.com>
Authored: Wed Apr 13 16:15:43 2016 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Wed Apr 13 16:15:43 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/lucene/spatial3d/geom/GeoConcavePolygon.java   | 2 ++
 .../java/org/apache/lucene/spatial3d/geom/GeoConvexPolygon.java    | 2 ++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6e5ec3bb/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoConcavePolygon.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoConcavePolygon.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoConcavePolygon.java
index 995e191..b28ebd2 100644
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoConcavePolygon.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoConcavePolygon.java
@@ -207,6 +207,7 @@ class GeoConcavePolygon extends GeoBasePolygon {
       invertedEdges[i] = new SidedPlane(edges[i]);
       notableEdgePoints[i] = new GeoPoint[]{start, end};
     }
+    /* Disable since GeoPolygonFactory does this too.
     // In order to naively confirm that the polygon is concave, I would need to
     // check every edge, and verify that every point (other than the edge endpoints)
     // is within the edge's sided plane.  This is an order n^2 operation.  That's still
@@ -220,6 +221,7 @@ class GeoConcavePolygon extends GeoBasePolygon {
         }
       }
     }
+    */
     
     // For each edge, create a bounds object.
     eitherBounds = new HashMap<>(edges.length);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6e5ec3bb/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoConvexPolygon.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoConvexPolygon.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoConvexPolygon.java
index dd5971f..890df30 100755
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoConvexPolygon.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoConvexPolygon.java
@@ -203,6 +203,7 @@ class GeoConvexPolygon extends GeoBasePolygon {
       edges[i] = sp;
       notableEdgePoints[i] = new GeoPoint[]{start, end};
     }
+    /* Disabled since GeoPolygonFactory does the checking too.
     // In order to naively confirm that the polygon is convex, I would need to
     // check every edge, and verify that every point (other than the edge endpoints)
     // is within the edge's sided plane.  This is an order n^2 operation.  That's still
@@ -216,6 +217,7 @@ class GeoConvexPolygon extends GeoBasePolygon {
         }
       }
     }
+    */
     
     // For each edge, create a bounds object.
     eitherBounds = new HashMap<>(edges.length);