/** * Constructs a grid index holding the triangles of a delaunay * triangulation. The grid will be made of (xCellCount * yCellCount) cells. * The smaller the cells the less triangles that fall in them, whuch means * better indexing, but also more cells in the index, which mean more * storage. The smaller the indexed region is, the smaller the cells can be * and still maintain the same capacity, but adding geometries outside the * initial region will invalidate the 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 */ public GridIndex(DelaunayTriangulation delaunay, int xCellCount, int yCellCount, BoundingBox region) { init(delaunay, xCellCount, yCellCount, region); }
init(indexDelaunay, (int) (indexRegion.getWidth() / xSize), (int) (indexRegion.getHeight() / ySize), indexRegion.unionWith(updatedRegion)); } else {