MosaicGrid { Geometry getTileGeometry(int tileX, int tileY) { double x1 = tileXToDegree(tileX); double x2 = tileXToDegree(tileX + 1); double y1 = tileYToDegree(tileY); double y2 = tileYToDegree(tileY + 1); return getGeometryFactory().toGeometry(new Envelope(x1, x2, y1, y2)); } 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 testGetTileGeometry() throws Exception { MosaicGrid mosaicGrid = new MosaicGrid(); assertTileGeometry(mosaicGrid, 0, 0, -180.0, -179.0, 89.0, 90.0); assertTileGeometry(mosaicGrid, 180, 90, 0.0, 1.0, -1.0, 0.0); assertTileGeometry(mosaicGrid, 10, 10, -170.0, -169.0, 79.0, 80.0); }