• Home
  • Raw
  • Download

Lines Matching refs:S2LatLng

38     if (y.getSize() == S2LatLng.fromRadians(0, 0)) {  in testIntervalOps()
86 S2LatLngRect.fromCenterSize(S2LatLng.fromDegrees(80, 170), S2LatLng.fromDegrees(40, 60)) in testBasic()
89 .fromCenterSize(S2LatLng.fromDegrees(10, 40), S2LatLng.fromDegrees(210, 400)).isFull()); in testBasic()
91 S2LatLngRect.fromCenterSize(S2LatLng.fromDegrees(-90, 180), S2LatLng.fromDegrees(20, 50)) in testBasic()
97 S2LatLngRect.fromPointPair(S2LatLng.fromDegrees(-35, -140), S2LatLng.fromDegrees(15, 155)), in testBasic()
100 S2LatLngRect.fromPointPair(S2LatLng.fromDegrees(25, -70), S2LatLng.fromDegrees(-90, 80)), in testBasic()
104 S2LatLng eqM180 = S2LatLng.fromRadians(0, -S2.M_PI); in testBasic()
105 S2LatLng northPole = S2LatLng.fromRadians(S2.M_PI_2, 0); in testBasic()
108 assertEquals(r1.getCenter(), S2LatLng.fromRadians(S2.M_PI_4, -S2.M_PI_2)); in testBasic()
109 assertEquals(r1.getVertex(0), S2LatLng.fromRadians(0, S2.M_PI)); in testBasic()
110 assertEquals(r1.getVertex(1), S2LatLng.fromRadians(0, 0)); in testBasic()
111 assertEquals(r1.getVertex(2), S2LatLng.fromRadians(S2.M_PI_2, 0)); in testBasic()
112 assertEquals(r1.getVertex(3), S2LatLng.fromRadians(S2.M_PI_2, S2.M_PI)); in testBasic()
113 assertTrue(r1.contains(S2LatLng.fromDegrees(30, -45))); in testBasic()
114 assertTrue(!r1.contains(S2LatLng.fromDegrees(30, 45))); in testBasic()
169 p = p.addPoint(S2LatLng.fromDegrees(0, 0)); in testBasic()
170 p = p.addPoint(S2LatLng.fromRadians(0, -S2.M_PI_2)); in testBasic()
171 p = p.addPoint(S2LatLng.fromRadians(S2.M_PI_4, -S2.M_PI)); in testBasic()
177 rectFromDegrees(70, 150, 80, 170).expanded(S2LatLng.fromDegrees(20, 30)).approxEquals( in testBasic()
179 assertTrue(S2LatLngRect.empty().expanded(S2LatLng.fromDegrees(20, 30)).isEmpty()); in testBasic()
180 assertTrue(S2LatLngRect.full().expanded(S2LatLng.fromDegrees(20, 30)).isFull()); in testBasic()
182 rectFromDegrees(-90, 170, 10, 20).expanded(S2LatLng.fromDegrees(30, 80)).approxEquals( in testBasic()
187 new S2LatLngRect(S2LatLng.fromDegrees(0, 170), S2LatLng.fromDegrees(0, -170)) in testBasic()
190 new S2LatLngRect(S2LatLng.fromDegrees(-15, 155), S2LatLng.fromDegrees(15, -155)); in testBasic()
193 llr1 = new S2LatLngRect(S2LatLng.fromDegrees(60, 150), S2LatLng.fromDegrees(80, 10)) in testBasic()
195 llr2 = new S2LatLngRect(S2LatLng.fromDegrees(45, -180), S2LatLng.fromDegrees(90, 180)); in testBasic()
199 assertTrue(new S2LatLngRect(S2LatLng.fromDegrees(-45, -45), S2LatLng.fromDegrees(45, 45)) in testBasic()
202 assertTrue(new S2LatLngRect(S2LatLng.fromDegrees(88, -80), S2LatLng.fromDegrees(89, 80)) in testBasic()
206 new S2LatLngRect(S2LatLng.fromDegrees(-30, -150), S2LatLng.fromDegrees(-10, 50)) in testBasic()
242 S2LatLng v0 = new S2LatLng(cell0tr.getVertexRaw(0)); in testBasic()
299 assertEquals(zero, a.getDistance(S2LatLng.fromDegrees(0, 0))); in testGetDistanceOverlapping()
317 verifyGetRectPointDistance(a, S2LatLng.fromDegrees(-2, -1)); in testGetDistanceRectVsPoint()
318 verifyGetRectPointDistance(a, S2LatLng.fromDegrees(1, 2)); in testGetDistanceRectVsPoint()
338 verifyGetRectPointDistance(b, S2LatLng.fromDegrees(87, 3)); in testGetDistanceRectVsPoint()
339 verifyGetRectPointDistance(b, S2LatLng.fromDegrees(87, -1)); in testGetDistanceRectVsPoint()
340 verifyGetRectPointDistance(b, S2LatLng.fromDegrees(89, 1)); in testGetDistanceRectVsPoint()
341 verifyGetRectPointDistance(b, S2LatLng.fromDegrees(89, 181)); in testGetDistanceRectVsPoint()
342 verifyGetRectPointDistance(b, S2LatLng.fromDegrees(85, 1)); in testGetDistanceRectVsPoint()
343 verifyGetRectPointDistance(b, S2LatLng.fromDegrees(85, 181)); in testGetDistanceRectVsPoint()
344 verifyGetRectPointDistance(b, S2LatLng.fromDegrees(90, 0)); in testGetDistanceRectVsPoint()
376 S2LatLngRect.fromPointPair(new S2LatLng(randomPoint()), new S2LatLng(randomPoint())); in testGetDistanceRandomPairs()
378 S2LatLngRect.fromPointPair(new S2LatLng(randomPoint()), new S2LatLng(randomPoint())); in testGetDistanceRandomPairs()
382 S2LatLng c = new S2LatLng(randomPoint()); in testGetDistanceRandomPairs()
396 S2LatLng pntA[] = in bruteForceDistance()
397 {new S2LatLng(a.latLo(), a.lngLo()), new S2LatLng(a.latLo(), a.lngHi()), in bruteForceDistance()
398 new S2LatLng(a.latHi(), a.lngHi()), new S2LatLng(a.latHi(), a.lngLo())}; in bruteForceDistance()
399 S2LatLng pntB[] = in bruteForceDistance()
400 {new S2LatLng(b.latLo(), b.lngLo()), new S2LatLng(b.latLo(), b.lngHi()), in bruteForceDistance()
401 new S2LatLng(b.latHi(), b.lngHi()), new S2LatLng(b.latHi(), b.lngLo())}; in bruteForceDistance()
414 S2LatLng currentA = pntA[i]; in bruteForceDistance()
415 S2LatLng currentB = pntB[i]; in bruteForceDistance()
433 private static S1Angle bruteForceRectPointDistance(S2LatLngRect a, S2LatLng b) { in bruteForceRectPointDistance()
441 S2EdgeUtil.getDistance(b.toPoint(), new S2LatLng(a.latLo(), a.lngLo()).toPoint(), in bruteForceRectPointDistance()
442 new S2LatLng(a.latHi(), a.lngLo()).toPoint()); in bruteForceRectPointDistance()
444 S2EdgeUtil.getDistance(b.toPoint(), new S2LatLng(a.latLo(), a.lngHi()).toPoint(), in bruteForceRectPointDistance()
445 new S2LatLng(a.latHi(), a.lngHi()).toPoint()); in bruteForceRectPointDistance()
453 private static S1Angle getDistance(S2LatLng x, S1Angle lat, S1Interval interval) { in getDistance()
462 return S1Angle.min(x.getDistance(new S2LatLng(lat, S1Angle.radians(interval.lo()))), in getDistance()
463 x.getDistance(new S2LatLng(lat, S1Angle.radians(interval.hi())))); in getDistance()
477 return S2LatLngRect.fromPoint(S2LatLng.fromDegrees(lat, lng).normalized()); in pointRectFromDegrees()
487 return new S2LatLngRect(S2LatLng.fromDegrees(latLo, lngLo).normalized(), in rectFromDegrees()
488 S2LatLng.fromDegrees(latHi, lngHi).normalized()); in rectFromDegrees()
496 private static void verifyGetRectPointDistance(S2LatLngRect a, S2LatLng p) { in verifyGetRectPointDistance()