GDALMultiLevelSource(Path sourceFile, int bandIndex, int numBands, int imageWidth, int imageHeight,
int tileWidth, int tileHeight, int levels, int dataBufferType, GeoCoding geoCoding) {
super(new DefaultMultiLevelModel(levels, Product.findImageToModelTransform(geoCoding), imageWidth, imageHeight));
this.sourceFile = sourceFile;
this.dataBufferType = dataBufferType;
this.bandIndex = bandIndex;
int numTilesX = imageWidth / tileWidth;
if (imageWidth % tileWidth != 0) {
numTilesX++;
}
int numTilesY = imageHeight / tileHeight;
if (imageHeight % tileHeight != 0) {
numTilesY++;
}
this.tileLayout = new TileLayout(imageWidth, imageHeight, tileWidth, tileHeight, numTilesX, numTilesY, levels);
this.tileLayout.numBands = numBands;
this.tileManager = new TileImageDisposer();
}