Index: src/test/org/apache/lucene/spatial3d/geom/GeoCircleTest.java | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- src/test/org/apache/lucene/spatial3d/geom/GeoCircleTest.java (date 1509612689000) | |
+++ src/test/org/apache/lucene/spatial3d/geom/GeoCircleTest.java (revision ) | |
@@ -16,6 +16,9 @@ | |
*/ | |
package org.apache.lucene.spatial3d.geom; | |
+import java.util.ArrayList; | |
+import java.util.List; | |
+ | |
import com.carrotsearch.randomizedtesting.annotations.Repeat; | |
import org.apache.lucene.util.LuceneTestCase; | |
import org.junit.Test; | |
@@ -500,6 +503,19 @@ | |
assertTrue(success); | |
} | |
+ @Test | |
+ public void LUCENE8032(){ | |
+ GeoCircle circle = GeoCircleFactory.makeExactGeoCircle(PlanetModel.WGS84, -0.00871130560892533, 2.3029626482941588, 3.038428918538668, 2.111101444186927E-4); | |
+ List<GeoPoint> pointList = new ArrayList<>(); | |
+ pointList.add(new GeoPoint(PlanetModel.WGS84, 0.06776123345311073, -0.7752474170087745)); | |
+ pointList.add(new GeoPoint(PlanetModel.WGS84, 0.11666112095362069,-0.8228149925456804)); | |
+ pointList.add(new GeoPoint(PlanetModel.WGS84, 0.08767696070608244, -0.9145966780640845)); | |
+ GeoPolygon polygon = GeoPolygonFactory.makeGeoPolygon(PlanetModel.WGS84, pointList); | |
+ assertEquals(GeoArea.CONTAINS, circle.getRelationship(polygon)); | |
+ GeoBBox bBox = GeoBBoxFactory.makeGeoBBox(PlanetModel.WGS84, 0.18851664435052304, -1.4896034997154073, -1.4970589804391838, 1.346321571653886); | |
+ assertEquals(GeoArea.CONTAINS, polygon.getRelationship(bBox)); | |
+ assertEquals(GeoArea.CONTAINS, circle.getRelationship(bBox)); | |
+ } | |
} |