MosaicGrid { double tileYToDegree(int tileY) { double degreePerTile = (double) 180 / numTileY; double lat = 90 - tileY * degreePerTile; return lat; } 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 testTileYToDegree() throws Exception { MosaicGrid mosaicGrid = new MosaicGrid(); assertEquals(90.0, mosaicGrid.tileYToDegree(0), 1e-5); assertEquals(89.0, mosaicGrid.tileYToDegree(1), 1e-5); assertEquals(0.0, mosaicGrid.tileYToDegree(90), 1e-5); assertEquals(-90.0, mosaicGrid.tileYToDegree(180), 1e-5); }