PixelGeoCoding extends AbstractGeoCoding implements BasicPixelGeoCoding { @Override public boolean transferGeoCoding(final Scene srcScene, final Scene destScene, final ProductSubsetDef subsetDef) { final Band srcLatBand = getLatBand(); final Product destProduct = destScene.getProduct(); Band latBand = destProduct.getBand(srcLatBand.getName()); if (latBand == null) { latBand = GeoCodingFactory.createSubset(srcLatBand, destScene, subsetDef); destProduct.addBand(latBand); } final Band srcLonBand = getLonBand(); Band lonBand = destProduct.getBand(srcLonBand.getName()); if (lonBand == null) { lonBand = GeoCodingFactory.createSubset(srcLonBand, destScene, subsetDef); destProduct.addBand(lonBand); } if (pixelPosEstimator instanceof AbstractGeoCoding && !estimatorCreatedInternally) { AbstractGeoCoding origGeoCoding = (AbstractGeoCoding) pixelPosEstimator; origGeoCoding.transferGeoCoding(srcScene, destScene, subsetDef); } String validMaskExpression = getValidMask(); try { if (validMaskExpression != null) { GeoCodingFactory.copyReferencedRasters(validMaskExpression, srcScene, destScene, subsetDef); } } catch (ParseException ignored) { validMaskExpression = null; } destScene.setGeoCoding(new PixelGeoCoding(latBand, lonBand, validMaskExpression, getSearchRadius())); return true; } 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 testTransferGeoCoding() throws IOException { doTestTransferGeoCoding(); }