DggUtils { static Rectangle2D createTileRectangle(int i, int j) { final double w = 11.25; final double h = 11.25; final double x = w * i - 180.0; final double y = 90.0 - h * (j + 1); return new Rectangle2D.Double(x, y, w, w); }  static Area computeArea(PointList pointList); static Rectangle2D createGridPointRectangle(double lon, double lat);  }
@Test public void testCreateTileRectangle() { Rectangle2D rectangle = DggUtils.createTileRectangle(0, 0); assertEquals(-180.0, rectangle.getX(), 1e-8); assertEquals(78.75, rectangle.getY(), 1e-8); assertEquals(11.25, rectangle.getWidth(), 1e-8); assertEquals(11.25, rectangle.getHeight(), 1e-8); rectangle = DggUtils.createTileRectangle(31, 0); assertEquals(168.75, rectangle.getX(), 1e-8); assertEquals(78.75, rectangle.getY(), 1e-8); assertEquals(11.25, rectangle.getWidth(), 1e-8); assertEquals(11.25, rectangle.getHeight(), 1e-8); rectangle = DggUtils.createTileRectangle(31, 15); assertEquals(168.75, rectangle.getX(), 1e-8); assertEquals(-90.0, rectangle.getY(), 1e-8); assertEquals(11.25, rectangle.getWidth(), 1e-8); assertEquals(11.25, rectangle.getHeight(), 1e-8); }