MosaicGrid { public void saveToConfiguration(Configuration conf) { conf.setInt("calvalus.mosaic.macroTileSize", macroTileSize); conf.setInt("calvalus.mosaic.numTileY", numTileY); conf.setInt("calvalus.mosaic.tileSize", tileSize); conf.setBoolean("calvalus.mosaic.withIntersectionCheck", withIntersectionCheck); } MosaicGrid();   MosaicGrid(int macroTileSize, int numTileY, int tileSize, boolean withIntersectionCheck, int maxReducers, int maxMacroTileCountX, String regionWkt); static MosaicGrid create(Configuration conf); void saveToConfiguration(Configuration conf); int getMacroTileSize(); int getTileSize(); double getPixelSize(); int getNumTileX(); int getNumTileY(); int getNumMacroTileX(); int getNumMacroTileY(); Rectangle computeBounds(Geometry roiGeometry); Rectangle alignToTileGrid(Rectangle rectangle); Geometry computeProductGeometry(Product product); TileIndexWritable[] getTileIndices(List<Point> tilePointIndices); Rectangle getTileRectangle(int tileX, int tileY); Rectangle getMacroTileRectangle(int tileX, int tileY); CrsGeoCoding createMacroCRS(Point macroTile); int getPartition(int macroTileX, int macroTileY); int getNumReducers();  }
@Test public void testSaveToConfiguration() throws Exception { Configuration configuration = new Configuration(); assertNull(configuration.get("calvalus.mosaic.macroTileSize")); assertNull(configuration.get("calvalus.mosaic.numTileY")); assertNull(configuration.get("calvalus.mosaic.tileSize")); MosaicGrid mosaicGrid = new MosaicGrid(); mosaicGrid.saveToConfiguration(configuration); assertNotNull(configuration.get("calvalus.mosaic.macroTileSize")); assertNotNull(configuration.get("calvalus.mosaic.numTileY")); assertNotNull(configuration.get("calvalus.mosaic.tileSize")); assertEquals("5", configuration.get("calvalus.mosaic.macroTileSize")); assertEquals("180", configuration.get("calvalus.mosaic.numTileY")); assertEquals("370", configuration.get("calvalus.mosaic.tileSize")); mosaicGrid = new MosaicGrid(6, 18, 20, true, 8, 0, null); mosaicGrid.saveToConfiguration(configuration); assertEquals("6", configuration.get("calvalus.mosaic.macroTileSize")); assertEquals("18", configuration.get("calvalus.mosaic.numTileY")); assertEquals("20", configuration.get("calvalus.mosaic.tileSize")); }