@Override protected void doGetHeightGrid(Sector gridSector, int gridWidth, int gridHeight, float[] result) { if (!this.tileMatrixSet.sector.intersects(gridSector)) { return; // no coverage in the specified sector } double targetPixelSpan = gridSector.deltaLatitude() / gridHeight; int targetIdx = this.tileMatrixSet.indexOfMatrixNearest(targetPixelSpan); TileBlock tileBlock = new TileBlock(); for (int idx = targetIdx; idx >= 0; idx--) { this.setEnableRetrieval(idx == targetIdx || idx == 0); // enable retrieval of the target matrix and the first matrix TileMatrix tileMatrix = this.tileMatrixSet.matrix(idx); if (this.fetchTileBlock(gridSector, gridWidth, gridHeight, tileMatrix, tileBlock)) { this.readHeightGrid(gridSector, gridWidth, gridHeight, tileBlock, result); return; } } }
@Override protected void doGetHeightLimits(Sector sector, float[] result) { if (!this.tileMatrixSet.sector.intersects(sector)) { return; // no coverage in the specified sector } double targetPixelSpan = sector.deltaLatitude() / GET_HEIGHT_LIMIT_SAMPLES; int targetIdx = this.tileMatrixSet.indexOfMatrixNearest(targetPixelSpan); TileBlock tileBlock = new TileBlock(); for (int idx = targetIdx; idx >= 0; idx--) { this.setEnableRetrieval(idx == targetIdx || idx == 0); // enable retrieval of the target matrix and the first matrix TileMatrix tileMatrix = this.tileMatrixSet.matrix(idx); if (this.fetchTileBlock(sector, tileMatrix, tileBlock)) { this.scanHeightLimits(sector, tileBlock, result); return; } } }