You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by th...@apache.org on 2016/04/14 01:21:37 UTC

[21/50] lucene-solr:jira/SOLR-8908: LUCENE-7201: Handle backside whole-world case for bbox generation.

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


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/05dc9021
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/05dc9021
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/05dc9021

Branch: refs/heads/jira/SOLR-8908
Commit: 05dc90215ad69c16c0284fdbe9e5df2cf4bf5f8e
Parents: 901a3af
Author: Karl Wright <Da...@gmail.com>
Authored: Mon Apr 11 12:52:48 2016 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Mon Apr 11 12:52:48 2016 -0400

----------------------------------------------------------------------
 .../src/java/org/apache/lucene/spatial3d/geom/GeoBBoxFactory.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/05dc9021/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoBBoxFactory.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoBBoxFactory.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoBBoxFactory.java
index de7493e..3d0b8cb 100755
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoBBoxFactory.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoBBoxFactory.java
@@ -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) {