MosaicGrid { double tileXToDegree(int tileX) { final double degreePerTile = (double) 360 / numTileX; final double lon = tileX * degreePerTile - 180.0; return lon; } 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 testTileXToDegree() throws Exception { MosaicGrid mosaicGrid = new MosaicGrid(); assertEquals(-180.0, mosaicGrid.tileXToDegree(0), 1e-5); assertEquals(-179.0, mosaicGrid.tileXToDegree(1), 1e-5); assertEquals(0.0, mosaicGrid.tileXToDegree(180), 1e-5); assertEquals(180.0, mosaicGrid.tileXToDegree(360), 1e-5); }