code: private void init(DelaunayTriangulation delaunay, int xCellCount, int yCellCount, BoundingBox region) {
          indexDelaunay = delaunay;
          indexRegion = region;
          x_size = region.getWidth() / yCellCount;
          y_size = region.getHeight() / xCellCount;
  
          // The grid will hold a trinagle for each cell, so a point (x,y) will lie
          // in the cell representing the grid partition of region to a
          //  xCellCount on yCellCount grid
          grid = new Triangle[xCellCount][yCellCount];
  
          Triangle colStartTriangle = indexDelaunay.find(middleOfCell(0, 0));
          updateCellValues(0, 0, xCellCount - 1, yCellCount - 1, colStartTriangle);
      }
docs: Initialize the grid index
  
  @param delaunay   delaunay triangulation to index
  @param xCellCount number of grid cells in a row
  @param yCellCount number of grid cells in a column
  @param region     geographic region to index