private List<Double> readMetaMaxFromElasticsearch() { Rectangle2D bounds = tilePyramid.getBounds(); List<Double> maxCountList = new ArrayList<>(); double pixelsPerTile = 256.0; for ( int i = 0; i < this.numZoomlevels ; i++ ){ // calculated by dividing the entirety of the dataset bounds // by the number of pixels in a tile and the number of tiles at that Zoom level double tilesAtZoomLevel = Math.pow(2, i); double xInterval = bounds.getWidth() / (pixelsPerTile * tilesAtZoomLevel); double yInterval = bounds.getHeight() / (pixelsPerTile * tilesAtZoomLevel); if (xInterval < 1){ xInterval = 1; } if (yInterval < 1){ yInterval = 1; } // search ES based off the calculated interval double maxDocCount = searchForMaxBucketValue(xInterval, yInterval); maxCountList.add(i, maxDocCount); } while(maxCountList.size() < 15){ maxCountList.add(maxCountList.get(maxCountList.size()-1)*0.75); } return maxCountList; }
@Override public String readMetaData(String pyramidId) throws IOException { Rectangle2D bounds = tilePyramid.getBounds(); try {