public QuadPrefixTree(SpatialContext ctx, Rectangle bounds, int maxLevels) {super(ctx, maxLevels);this.xmin = bounds.getMinX();this.xmax = bounds.getMaxX();this.ymin = bounds.getMinY();this.ymax = bounds.getMaxY();levelW = new double[maxLevels + 1];levelH = new double[maxLevels + 1];gridW = xmax - xmin;gridH = ymax - ymin;this.xmid = xmin + gridW/2.0;this.ymid = ymin + gridH/2.0;levelW[0] = gridW/2.0;levelH[0] = gridH/2.0;for (int i = 1; i < levelW.length; i++) {levelW[i] = levelW[i - 1] / 2.0;levelH[i] = levelH[i - 1] / 2.0;}}

public QuadPrefixTree(SpatialContext ctx, IRectangle bounds, int maxLevels): base(ctx, maxLevels){xmin = bounds.MinX;xmax = bounds.MaxX;ymin = bounds.MinY;ymax = bounds.MaxY;levelW = new double[maxLevels];levelH = new double[maxLevels];levelS = new int[maxLevels];levelN = new int[maxLevels];gridW = xmax - xmin;gridH = ymax - ymin;this.xmid = xmin + gridW / 2.0;this.ymid = ymin + gridH / 2.0;levelW[0] = gridW / 2.0;levelH[0] = gridH / 2.0;levelS[0] = 2;levelN[0] = 4;for (int i = 1; i < levelW.Length; i++){levelW[i] = levelW[i - 1] / 2.0;levelH[i] = levelH[i - 1] / 2.0;levelS[i] = levelS[i - 1] * 2;levelN[i] = levelN[i - 1] * 4;}}
