mirror of https://github.com/apache/lucene.git
LUCENE-7139: move these fixed tests out of the loop
This commit is contained in:
parent
626bed8bc6
commit
c498fcdc43
|
@ -67,20 +67,21 @@ public class GeoPointTest extends LuceneTestCase {
|
|||
// Compute ellipsoid distance; it should agree for a sphere
|
||||
final double surfaceDistance = PlanetModel.SPHERE.surfaceDistance(p1,p2);
|
||||
assertEquals(arcDistance, surfaceDistance, 1e-6);
|
||||
// Now try some WGS84 points (taken randomly and compared against a known-good implementation)
|
||||
assertEquals(1.1444648695765323, PlanetModel.WGS84.surfaceDistance(
|
||||
new GeoPoint(PlanetModel.WGS84, 0.038203808753702884, -0.6701260455506466),
|
||||
new GeoPoint(PlanetModel.WGS84, -0.8453720422675458, 0.1737353153814496)), 1e-6);
|
||||
assertEquals(1.4345148695890722, PlanetModel.WGS84.surfaceDistance(
|
||||
new GeoPoint(PlanetModel.WGS84, 0.5220926323378574, 0.6758041581907408),
|
||||
new GeoPoint(PlanetModel.WGS84, -0.8453720422675458, 0.1737353153814496)), 1e-6);
|
||||
assertEquals(2.32418144616446, PlanetModel.WGS84.surfaceDistance(
|
||||
new GeoPoint(PlanetModel.WGS84, 0.09541335760967473, 1.2091829760623236),
|
||||
new GeoPoint(PlanetModel.WGS84, -0.8501591797459979, -2.3044806381627594)), 1e-6);
|
||||
assertEquals(2.018421047005435, PlanetModel.WGS84.surfaceDistance(
|
||||
new GeoPoint(PlanetModel.WGS84, 0.3402853531962009, -0.43544195327249957),
|
||||
new GeoPoint(PlanetModel.WGS84, -0.8501591797459979, -2.3044806381627594)), 1e-6);
|
||||
}
|
||||
|
||||
// Now try some WGS84 points (taken randomly and compared against a known-good implementation)
|
||||
assertEquals(1.1444648695765323, PlanetModel.WGS84.surfaceDistance(
|
||||
new GeoPoint(PlanetModel.WGS84, 0.038203808753702884, -0.6701260455506466),
|
||||
new GeoPoint(PlanetModel.WGS84, -0.8453720422675458, 0.1737353153814496)), 1e-6);
|
||||
assertEquals(1.4345148695890722, PlanetModel.WGS84.surfaceDistance(
|
||||
new GeoPoint(PlanetModel.WGS84, 0.5220926323378574, 0.6758041581907408),
|
||||
new GeoPoint(PlanetModel.WGS84, -0.8453720422675458, 0.1737353153814496)), 1e-6);
|
||||
assertEquals(2.32418144616446, PlanetModel.WGS84.surfaceDistance(
|
||||
new GeoPoint(PlanetModel.WGS84, 0.09541335760967473, 1.2091829760623236),
|
||||
new GeoPoint(PlanetModel.WGS84, -0.8501591797459979, -2.3044806381627594)), 1e-6);
|
||||
assertEquals(2.018421047005435, PlanetModel.WGS84.surfaceDistance(
|
||||
new GeoPoint(PlanetModel.WGS84, 0.3402853531962009, -0.43544195327249957),
|
||||
new GeoPoint(PlanetModel.WGS84, -0.8501591797459979, -2.3044806381627594)), 1e-6);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue