PixelGeoCoding extends AbstractGeoCoding implements BasicPixelGeoCoding { static boolean isCrossingMeridianInsideQuad(boolean crossingMeridianInsideProduct, float lon0, float lon1, float lon2, float lon3) { if (!crossingMeridianInsideProduct) { return false; } float lonMin = min(lon0, min(lon1, min(lon2, lon3))); float lonMax = max(lon0, max(lon1, max(lon2, lon3))); return Math.abs(lonMax - lonMin) > 180.0; } PixelGeoCoding(final Band latBand, final Band lonBand, final String validMask, final int searchRadius);  PixelGeoCoding(final Band latBand, final Band lonBand, final String validMask, final int searchRadius,
                          ProgressMonitor pm); static long getRequiredMemory(Product product, boolean usesValidMask); @Override Band getLatBand(); @Override Band getLonBand(); @Override String getValidMask(); @Override GeoCoding getPixelPosEstimator(); @Override int getSearchRadius(); @Override boolean isCrossingMeridianAt180(); @Override boolean canGetPixelPos(); @Override boolean canGetGeoPos(); @Override PixelPos getPixelPos(final GeoPos geoPos, PixelPos pixelPos); void getPixelPosUsingEstimator(final GeoPos geoPos, PixelPos pixelPos); void getPixelPosUsingQuadTreeSearch(final GeoPos geoPos, PixelPos pixelPos); @Override GeoPos getGeoPos(final PixelPos pixelPos, GeoPos geoPos); @Override boolean equals(Object o); @Override int hashCode(); @Override synchronized void dispose(); @Override boolean transferGeoCoding(final Scene srcScene, final Scene destScene, final ProductSubsetDef subsetDef); @Override Datum getDatum();  }
@Test public void testIsCrossingMeridianInsideQuad() throws Exception { float lon0 = 160.0f; float lon1 = 150.0f; float lon2 = -169.0f; float lon3 = 165.0f; assertTrue(PixelGeoCoding.isCrossingMeridianInsideQuad(true, lon0, lon1, lon2, lon3)); lon0 = -160.0f; lon1 = -150.0f; lon2 = 170.0f; lon3 = -170.0f; assertTrue(PixelGeoCoding.isCrossingMeridianInsideQuad(true, lon0, lon1, lon2, lon3)); lon0 = 170.0f; lon1 = 170.0f; lon2 = 179.0f; lon3 = 179.0f; assertFalse(PixelGeoCoding.isCrossingMeridianInsideQuad(true, lon0, lon1, lon2, lon3)); lon0 = 170.0f; lon1 = 170.0f; lon2 = 179.0f; lon3 = 179.0f; assertFalse(PixelGeoCoding.isCrossingMeridianInsideQuad(false, lon0, lon1, lon2, lon3)); lon0 = -10.0f; lon1 = -10.0f; lon2 = 10.0f; lon3 = 10.0f; assertFalse(PixelGeoCoding.isCrossingMeridianInsideQuad(false, lon0, lon1, lon2, lon3)); }