LUCENE-7955: GeoDegeneratePath did not compute endpoint bounding planes properly.

This commit is contained in:
Karl Wright 2017-09-14 10:50:44 -04:00
parent 277bc3a94b
commit c317ad8c1f
1 changed files with 4 additions and 4 deletions

View File

@ -119,20 +119,20 @@ class GeoDegeneratePath extends GeoBasePath {
if (i == 0) { if (i == 0) {
// Starting endpoint // Starting endpoint
final SegmentEndpoint startEndpoint = new SegmentEndpoint(currentSegment.start, final SegmentEndpoint startEndpoint = new SegmentEndpoint(currentSegment.start,
new SidedPlane(currentSegment.startCutoffPlane)); currentSegment.startCutoffPlane);
endPoints.add(startEndpoint); endPoints.add(startEndpoint);
this.edgePoints = new GeoPoint[]{currentSegment.start}; this.edgePoints = new GeoPoint[]{currentSegment.start};
continue; continue;
} }
endPoints.add(new SegmentEndpoint(currentSegment.start, endPoints.add(new SegmentEndpoint(currentSegment.start,
new SidedPlane(segments.get(i-1).endCutoffPlane), segments.get(i-1).endCutoffPlane,
new SidedPlane(currentSegment.startCutoffPlane))); currentSegment.startCutoffPlane));
} }
// Do final endpoint // Do final endpoint
final PathSegment lastSegment = segments.get(segments.size()-1); final PathSegment lastSegment = segments.get(segments.size()-1);
endPoints.add(new SegmentEndpoint(lastSegment.end, endPoints.add(new SegmentEndpoint(lastSegment.end,
new SidedPlane(lastSegment.endCutoffPlane))); lastSegment.endCutoffPlane));
} }