SlstrTiePointGeoCoding extends TiePointGeoCoding { @SuppressWarnings("MethodDoesntCallSuperMethod") @Override public GeoCoding clone() { try { return new SlstrTiePointGeoCoding(super.getLatGrid(), super.getLonGrid(), transform); } catch (NoninvertibleTransformException e) { throw new IllegalStateException("Unable to clone: " + e.getMessage()); } } SlstrTiePointGeoCoding(TiePointGrid latGrid, TiePointGrid lonGrid, AffineTransform2D transform); @Override GeoPos getGeoPos(PixelPos pixelPos, GeoPos geoPos); @Override PixelPos getPixelPos(GeoPos geoPos, PixelPos pixelPos); @Override boolean transferGeoCoding(Scene srcScene, Scene destScene, ProductSubsetDef subsetDef); @Override boolean canClone(); @SuppressWarnings("MethodDoesntCallSuperMethod") @Override GeoCoding clone();  }
@Test public void testClone() { final PixelPos pixelPos = new PixelPos(1.4, 1.5); GeoPos geoPos = slstrCoding.getGeoPos(pixelPos, null); assertEquals(1.75, geoPos.lon, 1e-8); assertEquals(1.7, geoPos.lat, 1e-8); final GeoCoding clone = slstrCoding.clone(); geoPos = clone.getGeoPos(pixelPos, null); assertEquals(1.75, geoPos.lon, 1e-8); assertEquals(1.7, geoPos.lat, 1e-8); }