Aggregations: Fixed failures when geo points are all either positive or negative
This commit is contained in:
parent
288eb3d803
commit
f78480a0bc
|
@ -172,9 +172,9 @@ public class InternalGeoBounds extends InternalMetricsAggregation implements Geo
|
|||
if (Double.isInfinite(top)) {
|
||||
return null;
|
||||
} else if (Double.isInfinite(posLeft)) {
|
||||
return new BoundingBox(new GeoPoint(top, negLeft), new GeoPoint(bottom, posRight));
|
||||
return new BoundingBox(new GeoPoint(top, negLeft), new GeoPoint(bottom, negRight));
|
||||
} else if (Double.isInfinite(negLeft)) {
|
||||
return new BoundingBox(new GeoPoint(top, posLeft), new GeoPoint(bottom, negRight));
|
||||
return new BoundingBox(new GeoPoint(top, posLeft), new GeoPoint(bottom, posRight));
|
||||
} else if (wrapLongitude) {
|
||||
double unwrappedWidth = posRight - negLeft;
|
||||
double wrappedWidth = (180 - posLeft) - (-180 - negRight);
|
||||
|
|
Loading…
Reference in New Issue