lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject lucene-solr:branch_7x: LUCENE-7970: Correct a misinterpretation of bearing direction
Date Mon, 25 Sep 2017 07:08:43 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 2c95fa411 -> 9add14a51


LUCENE-7970: Correct a misinterpretation of bearing direction


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

Branch: refs/heads/branch_7x
Commit: 9add14a513af620da46bfeeb05f6ccf9af61b1c2
Parents: 2c95fa4
Author: Karl Wright <DaddyWri@gmail.com>
Authored: Mon Sep 25 03:06:49 2017 -0400
Committer: Karl Wright <DaddyWri@gmail.com>
Committed: Mon Sep 25 03:08:38 2017 -0400

----------------------------------------------------------------------
 .../lucene/spatial3d/geom/GeoExactCircle.java       | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9add14a5/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoExactCircle.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoExactCircle.java
b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoExactCircle.java
index 7d96cfa..b6ae081 100644
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoExactCircle.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoExactCircle.java
@@ -124,21 +124,21 @@ class GeoExactCircle extends GeoBaseCircle {
       // We construct approximation planes until we have a low enough error estimate
       final List<ApproximationSlice> slices = new ArrayList<>(100);
       // Construct four cardinal points, and then we'll build the first two planes
-      final GeoPoint northPoint = planetModel.surfacePointOnBearing(center, cutoffAngle,
Math.PI * 0.5);
-      final GeoPoint southPoint = planetModel.surfacePointOnBearing(center, cutoffAngle,
Math.PI * 1.5);
-      final GeoPoint eastPoint = planetModel.surfacePointOnBearing(center, cutoffAngle, 0.0);
-      final GeoPoint westPoint = planetModel.surfacePointOnBearing(center, cutoffAngle, Math.PI);
+      final GeoPoint northPoint = planetModel.surfacePointOnBearing(center, cutoffAngle,
0.0);
+      final GeoPoint southPoint = planetModel.surfacePointOnBearing(center, cutoffAngle,
Math.PI);
+      final GeoPoint eastPoint = planetModel.surfacePointOnBearing(center, cutoffAngle, Math.PI
* 0.5);
+      final GeoPoint westPoint = planetModel.surfacePointOnBearing(center, cutoffAngle, Math.PI
* 1.5);
       
       this.edgePoints = new GeoPoint[]{northPoint};
       
       if (planetModel.c > planetModel.ab) {
         // z can be greater than x or y, so ellipse is longer in height than width
-        slices.add(new ApproximationSlice(center, eastPoint, 0.0, westPoint, Math.PI, northPoint,
Math.PI * 0.5));
-        slices.add(new ApproximationSlice(center, westPoint, Math.PI, eastPoint, 0.0, southPoint,
Math.PI * 1.5));
+        slices.add(new ApproximationSlice(center, eastPoint, Math.PI * 0.5, westPoint, Math.PI
* -0.5, northPoint, 0.0));
+        slices.add(new ApproximationSlice(center, westPoint, Math.PI * 1.5, eastPoint, Math.PI
* 0.5, southPoint, Math.PI));
       } else {
         // z will be less than x or y, so ellipse is shorter than it is tall
-        slices.add(new ApproximationSlice(center, northPoint, Math.PI * 0.5, southPoint,
Math.PI * 1.5, eastPoint, 0.0));
-        slices.add(new ApproximationSlice(center, southPoint, Math.PI * 1.5, northPoint,
Math.PI * 0.5, westPoint, Math.PI));
+        slices.add(new ApproximationSlice(center, northPoint, Math.PI * 2.0, southPoint,
Math.PI, eastPoint, Math.PI * 0.5));
+        slices.add(new ApproximationSlice(center, southPoint, Math.PI, northPoint, 0.0, westPoint,
Math.PI * 1.5));
       }
       
       // Now, iterate over slices until we have converted all of them into safe SidedPlanes.


Mime
View raw message