Fix for failing BasePolygonBuilder
This commit is contained in:
parent
128b83e4a5
commit
371d6021e7
|
@ -359,7 +359,7 @@ public abstract class BasePolygonBuilder<E extends BasePolygonBuilder<E>> extend
|
||||||
current.intersect = current.coordinate;
|
current.intersect = current.coordinate;
|
||||||
final int intersections = intersections(current.coordinate.x, edges);
|
final int intersections = intersections(current.coordinate.x, edges);
|
||||||
final int pos = Arrays.binarySearch(edges, 0, intersections, current, INTERSECTION_ORDER);
|
final int pos = Arrays.binarySearch(edges, 0, intersections, current, INTERSECTION_ORDER);
|
||||||
if (pos < 0) {
|
if (pos >= 0) {
|
||||||
throw new ElasticsearchParseException("Invaild shape: Hole is not within polygon");
|
throw new ElasticsearchParseException("Invaild shape: Hole is not within polygon");
|
||||||
}
|
}
|
||||||
final int index = -(pos+2);
|
final int index = -(pos+2);
|
||||||
|
|
Loading…
Reference in New Issue