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

This commit is contained in:
Karl Wright 2016-04-13 16:15:43 -04:00
parent 69f3d1fe5f
commit 6e5ec3bb4c
2 changed files with 4 additions and 0 deletions
lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom

View File

@ -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);

View File

@ -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);