LUCENE-7201: Handle backside whole-world case for bbox generation.

This commit is contained in:
Karl Wright 2016-04-11 12:52:48 -04:00
parent a03c0b806d
commit 5f4af54f99
1 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,8 @@ public class GeoBBoxFactory {
leftLon = -Math.PI;
if (rightLon > Math.PI)
rightLon = Math.PI;
if (Math.abs(leftLon + Math.PI) < Vector.MINIMUM_RESOLUTION && Math.abs(rightLon - Math.PI) < Vector.MINIMUM_RESOLUTION) {
if ((Math.abs(leftLon + Math.PI) < Vector.MINIMUM_RESOLUTION && Math.abs(rightLon - Math.PI) < Vector.MINIMUM_RESOLUTION) ||
(Math.abs(rightLon + Math.PI) < Vector.MINIMUM_RESOLUTION && Math.abs(leftLon - Math.PI) < Vector.MINIMUM_RESOLUTION)) {
if (Math.abs(topLat - Math.PI * 0.5) < Vector.MINIMUM_RESOLUTION && Math.abs(bottomLat + Math.PI * 0.5) < Vector.MINIMUM_RESOLUTION)
return new GeoWorld(planetModel);
if (Math.abs(topLat - bottomLat) < Vector.MINIMUM_RESOLUTION) {