@Test public void testEqualRasterSizes() throws Exception { final int WIDTH = 10; final int HEIGHT = 10; Product product = new Product("productName", "productWithDifferentBandSizes", WIDTH, HEIGHT); product.setPreferredTileSize(4, 8); Band band1 = new Band("band1", ProductData.TYPE_FLOAT32, WIDTH, HEIGHT); Band band2 = new Band("band2", ProductData.TYPE_FLOAT32, WIDTH, HEIGHT); float[] band1Data = new float[WIDTH * HEIGHT]; float[] band2Data = new float[WIDTH * HEIGHT]; for (int i = 0; i < WIDTH * HEIGHT; i++) { band1Data[i] = i; } for (int i = 0; i < WIDTH * HEIGHT; i++) { band2Data[i] = 10000 - i; } band1.setData(new ProductData.Float(band1Data)); band2.setData(new ProductData.Float(band2Data)); product.addBand(band1); product.addBand(band2); result = new HashMap<>(); StreamingProductWriter.writeProductInSlices(product, new NullWriter(), "NullFormat", 10, ProgressMonitor.NULL); }
public static void writeProductInSlices(Configuration configuration, ProgressMonitor pm, Product product, Path path, int tileHeight) throws IOException { PathConfiguration output = new PathConfiguration(path, configuration); writeProductInSlices(product, output, StreamingProductPlugin.FORMAT_NAME, tileHeight, pm); }
StreamingProductWriter extends AbstractProductWriter { public static void writeProductInSlices(Configuration configuration, ProgressMonitor pm, Product product, Path path, int tileHeight) throws IOException { PathConfiguration output = new PathConfiguration(path, configuration); writeProductInSlices(product, output, StreamingProductPlugin.FORMAT_NAME, tileHeight, pm); } }
StreamingProductWriter extends AbstractProductWriter { public static void writeProductInSlices(Configuration configuration, ProgressMonitor pm, Product product, Path path, int tileHeight) throws IOException { PathConfiguration output = new PathConfiguration(path, configuration); writeProductInSlices(product, output, StreamingProductPlugin.FORMAT_NAME, tileHeight, pm); } StreamingProductWriter(ProductWriterPlugIn productWriterPlugIn); }
StreamingProductWriter extends AbstractProductWriter { public static void writeProductInSlices(Configuration configuration, ProgressMonitor pm, Product product, Path path, int tileHeight) throws IOException { PathConfiguration output = new PathConfiguration(path, configuration); writeProductInSlices(product, output, StreamingProductPlugin.FORMAT_NAME, tileHeight, pm); } StreamingProductWriter(ProductWriterPlugIn productWriterPlugIn); @Override void writeBandRasterData(Band band, int sourceOffsetX, int sourceOffsetY, int sourceWidth, int sourceHeight, ProductData productData, ProgressMonitor pm); @Override void flush(); @Override void close(); @Override void deleteOutput(); static void writeProductInSlices(Configuration configuration,
                                            ProgressMonitor pm,
                                            Product product,
                                            Path path,
                                            int tileHeight); static void writeProductInSlices(Product product, Object output, String format, int tileHeight, ProgressMonitor pm); }
StreamingProductWriter extends AbstractProductWriter { public static void writeProductInSlices(Configuration configuration, ProgressMonitor pm, Product product, Path path, int tileHeight) throws IOException { PathConfiguration output = new PathConfiguration(path, configuration); writeProductInSlices(product, output, StreamingProductPlugin.FORMAT_NAME, tileHeight, pm); } StreamingProductWriter(ProductWriterPlugIn productWriterPlugIn); @Override void writeBandRasterData(Band band, int sourceOffsetX, int sourceOffsetY, int sourceWidth, int sourceHeight, ProductData productData, ProgressMonitor pm); @Override void flush(); @Override void close(); @Override void deleteOutput(); static void writeProductInSlices(Configuration configuration,
                                            ProgressMonitor pm,
                                            Product product,
                                            Path path,
                                            int tileHeight); static void writeProductInSlices(Product product, Object output, String format, int tileHeight, ProgressMonitor pm);  }