### Question:
PolarOrbitingPolygon { boolean isPointInRing(double sampleLat, double sampleLon, List<Point> ring) { final double equatorLat = 0.0; double firstEquatorCrossingLonPlus90 = Double.NaN; double transformedSampleLon = Double.NaN; boolean isInside = false; for (int i = 0; i < ring.size() - 1; ++i) { final Point point = ring.get(i); final Point nextPoint = ring.get(i + 1); final double lon1 = shiftIfZero(GeometryUtil.normalizeLongitude(point.getLon() - sampleLon)); final double lat1 = shiftIfZero(point.getLat()); final double lon2 = shiftIfZero(GeometryUtil.normalizeLongitude(nextPoint.getLon() - sampleLon)); final double lat2 = shiftIfZero(nextPoint.getLat()); if (isEdgeCrossingMeridian(lon1, lon2)) { final double crossingLat = getLatitudeAtMeridian(lat1, lon1, lat2, lon2); if (isBetween(crossingLat, equatorLat, sampleLat)) { isInside = !isInside; } } if (isEdgeCrossingEquator(lat1, lat2)) { final double crossingLon = getLongitudeAtEquator(lat1, point.getLon(), lat2, nextPoint.getLon()); if (Double.isNaN(firstEquatorCrossingLonPlus90)) { firstEquatorCrossingLonPlus90 = GeometryUtil.normalizeLongitude(crossingLon + 90.0); transformedSampleLon = GeometryUtil.normalizeLongitude(sampleLon - firstEquatorCrossingLonPlus90); } final double transformedCrossingLon = GeometryUtil.normalizeLongitude( crossingLon - firstEquatorCrossingLonPlus90); if (isBetween(transformedCrossingLon, 0.0, transformedSampleLon)) { isInside = !isInside; } } } return isInside; } PolarOrbitingPolygon(int id, long time, Geometry geometry); int getId(); long getTime(); boolean isPointInPolygon(double sampleLat, double sampleLon);  }### Answer:
@Test public void testIsPointInRing() { Geometry geometry = new Polygon(new LinearRing[]{new LinearRing(PolarOrbitingPolygonTestData.TEST_POLYGON)}); final PolarOrbitingPolygon polygon = new PolarOrbitingPolygon(1, System.currentTimeMillis(), geometry); final List<PolarOrbitingPolygon.Point> points = polygon.getRings().get(0); assertFalse( "lat=" + PolarOrbitingPolygonTestData.TEST_POINTS_INSIDE[0].getY() + " lon=" + PolarOrbitingPolygonTestData.TEST_POINTS_INSIDE[0].getX(), polygon.isPointInRing(PolarOrbitingPolygonTestData.TEST_POINTS_INSIDE[0].getY(), PolarOrbitingPolygonTestData.TEST_POINTS_INSIDE[0].getX(), points)); assertTrue( "lat=" + PolarOrbitingPolygonTestData.TEST_POINTS_INSIDE[1].getY() + " lon=" + PolarOrbitingPolygonTestData.TEST_POINTS_INSIDE[1].getX(), polygon.isPointInRing(PolarOrbitingPolygonTestData.TEST_POINTS_INSIDE[1].getY(), PolarOrbitingPolygonTestData.TEST_POINTS_INSIDE[1].getX(), points)); assertTrue( "lat=" + PolarOrbitingPolygonTestData.TEST_POINTS_INSIDE[2].getY() + " lon=" + PolarOrbitingPolygonTestData.TEST_POINTS_INSIDE[2].getX(), polygon.isPointInRing(PolarOrbitingPolygonTestData.TEST_POINTS_INSIDE[2].getY(), PolarOrbitingPolygonTestData.TEST_POINTS_INSIDE[2].getX(), points)); }