Selon "Etienne B. Racine" <[email protected]>:

> Hi List,
>
> Is there a way to control the block size of overviews and inspect that
> block size from gdalinfo ?
> I have a raster with 256x256 block size.
> Band 1 Block=256x256 Type=Byte, ColorInterp=Red
> Band 2 Block=256x256 Type=Byte, ColorInterp=Green
> Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
>
> I'm trying to feed the images to a program that seemingly supports Tiffs
> with internal overview of the same block size than the image.
>
> I've tried >gdaladdo --config BLOCKXSIZE 256 --config BLOCKYSIZE 256
> image.tif 2 4 8 16 32
> gdalinfo:
> Band 1 Block=256x256 Type=Byte, ColorInterp=Red
>   Overviews: 8655x5655, 4328x2828, 2164x1414, 1082x707, 541x354
> Band 2 Block=256x256 Type=Byte, ColorInterp=Green
>   Overviews: 8655x5655, 4328x2828, 2164x1414, 1082x707, 541x354
> Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
>   Overviews: 8655x5655, 4328x2828, 2164x1414, 1082x707, 541x354
>
> But I couldn't find a way to inspect the overview block size to confirm
> they are 256x256 since I get the same results if I set BLOCKSIZE to 128. I
> suspect these options are ignored in gdaladdo.

The right name is GDAL_TIFF_OVR_BLOCKSIZE. See http://gdal.org/frmt_gtiff.html

>
> Any way I can 1) control the overview block size and 2) inspect the block
> size ?

Not directly with gdalinfo.
With Python :

from osgeo import gdal
ds = gdal.Open('your.tif')
print(ds.GetRasterBand(1).GetOverview(0).GetBlockSize())



>
> Thanks for your help,
> Etienne
>


_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to