@Test public void testTiePointFlipping_Both() throws IOException { final Product flipped = ProductFlipper.createFlippedProduct(product, ProductFlipper.FLIP_BOTH, "b", "b"); final TiePointGrid flippedT1 = flipped.getTiePointGrid("t1"); final float[] expectedT1 = { 0.4f, 0.2f, 0.3f, 0.4f, 0.9f, 0.8f, 0.4f, 0.3f, 0.6f }; assertTrue(Arrays.equals(expectedT1, (float[]) flippedT1.getDataElems())); assertEquals(4, flippedT1.getOffsetX(), 1.0e-6); assertEquals(6, flippedT1.getOffsetY(), 1.0e-6); final TiePointGrid flippedT2 = flipped.getTiePointGrid("t3"); assertEquals(7, flippedT2.getOffsetX(), 1.0e-6); assertEquals(9, flippedT2.getOffsetY(), 1.0e-6); GeneralPath[] flippedPath = ProductUtils.createGeoBoundaryPaths(flipped); assertEquals(1, flippedPath.length); final Rectangle2D expBounds = geoBoundaryPath[0].getBounds2D(); final Rectangle2D actualBounds = flippedPath[0].getBounds2D(); assertEquals(expBounds.getMinX(), actualBounds.getMinX(), 1.0e-6); assertEquals(expBounds.getMinY(), actualBounds.getMinY(), 1.0e-6); assertEquals(expBounds.getMaxX(), actualBounds.getMaxX(), 1.0e-6); assertEquals(expBounds.getMaxY(), actualBounds.getMaxY(), 1.0e-6); }
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; }