@Test public void testTiePointFlipping_Sequence() throws IOException { final Product v = ProductFlipper.createFlippedProduct(product, ProductFlipper.FLIP_VERTICAL, "v", "v"); final Product vh = ProductFlipper.createFlippedProduct(v, ProductFlipper.FLIP_HORIZONTAL, "vh", "vh"); final TiePointGrid vhFlippedT1 = vh.getTiePointGrid("t1"); assertEquals(4, vhFlippedT1.getOffsetX(), 1.0e-6); assertEquals(6, vhFlippedT1.getOffsetY(), 1.0e-6); final TiePointGrid vhFlippedT2 = vh.getTiePointGrid("t3"); assertEquals(7, vhFlippedT2.getOffsetX(), 1.0e-6); assertEquals(9, vhFlippedT2.getOffsetY(), 1.0e-6); final Product vhb = ProductFlipper.createFlippedProduct(vh, ProductFlipper.FLIP_BOTH, "vhb", "vhb"); final TiePointGrid vhbFlippedT1 = vhb.getTiePointGrid("t1"); assertEquals(0, vhbFlippedT1.getOffsetX(), 1.0e-6); assertEquals(0, vhbFlippedT1.getOffsetY(), 1.0e-6); final TiePointGrid vhbFlippedT2 = vhb.getTiePointGrid("t3"); assertEquals(1, vhbFlippedT2.getOffsetX(), 1.0e-6); assertEquals(1, vhbFlippedT2.getOffsetY(), 1.0e-6); GeneralPath[] flippedPath = ProductUtils.createGeoBoundaryPaths(vhb); assertEquals(1, flippedPath.length); assertEquals(geoBoundaryPath[0].getBounds2D(), flippedPath[0].getBounds2D()); }
public static Product createFlippedProduct(Product sourceProduct, int flipType, String name, String desc) throws IOException { return createFlippedProduct(sourceProduct, false, flipType, name, desc); }
ProductFlipper extends AbstractProductBuilder { public static Product createFlippedProduct(Product sourceProduct, int flipType, String name, String desc) throws IOException { return createFlippedProduct(sourceProduct, false, flipType, name, desc); } }
ProductFlipper extends AbstractProductBuilder { public static Product createFlippedProduct(Product sourceProduct, int flipType, String name, String desc) throws IOException { return createFlippedProduct(sourceProduct, false, flipType, name, desc); } ProductFlipper(int flipType);  ProductFlipper(int flipType, boolean sourceProductOwner); }
ProductFlipper extends AbstractProductBuilder { public static Product createFlippedProduct(Product sourceProduct, int flipType, String name, String desc) throws IOException { return createFlippedProduct(sourceProduct, false, flipType, name, desc); } ProductFlipper(int flipType);  ProductFlipper(int flipType, boolean sourceProductOwner); static Product createFlippedProduct(Product sourceProduct, int flipType, String name, String desc); static Product createFlippedProduct(Product sourceProduct, boolean sourceProductOwner, int flipType,
                                               String name, String desc); int getFlipType(); @Override void close(); @Override void readBandRasterData(Band destBand,
                                   int destOffsetX,
                                   int destOffsetY,
                                   int destWidth,
                                   int destHeight,
                                   ProductData destBuffer,
                                   ProgressMonitor pm); }
ProductFlipper extends AbstractProductBuilder { public static Product createFlippedProduct(Product sourceProduct, int flipType, String name, String desc) throws IOException { return createFlippedProduct(sourceProduct, false, flipType, name, desc); } ProductFlipper(int flipType);  ProductFlipper(int flipType, boolean sourceProductOwner); static Product createFlippedProduct(Product sourceProduct, int flipType, String name, String desc); static Product createFlippedProduct(Product sourceProduct, boolean sourceProductOwner, int flipType,
                                               String name, String desc); int getFlipType(); @Override void close(); @Override void readBandRasterData(Band destBand,
                                   int destOffsetX,
                                   int destOffsetY,
                                   int destWidth,
                                   int destHeight,
                                   ProductData destBuffer,
                                   ProgressMonitor pm); static final int FLIP_HORIZONTAL; static final int FLIP_VERTICAL; static final int FLIP_BOTH; }