[Gdal-dev] Overviews questions

Frank Warmerdam warmerdam at pobox.com
Tue Mar 21 10:26:34 EST 2006


Jeff L. wrote:
> Hi,
> 
> I have few questions about overviews in GDAL as I'm trying to understand 
> them. My current understanding of overviews in GDAL is that their are 
> stored as an auxiliary 'geotiff' file with an .ovr extension or an Erdas 
> .rrd file.

Jeff,

This is generally correct.   Some formats also have their own internal
overviews (TIFF can, ECW, JPEG2000, MrSID).

> My question is really how a band know that has overviews generated for 
> it and how the bands overviews are stored in a tiff file ? is there any 
> assumption about the order ?
> example: overview1_ band 1, overview2_band1,...overview1_band2, 
> overview2_band2.... ?

If the base file has three bands, then each image in the overview TIFF
file should have exactly 3 bands (samples).  So each "image directory" in
the .ovr file will be an overview level for all bands of the image.

There is no required order of the overview levels.  If you ran the command
"gdaladdo 2 8 4" then the overviews in the .ovr file would get generated
in that order.

> Let say I have a bitmap of three band (RGB) and I want to generate 
> overview levels 2, 4, 6 and 8 for band 2 only. Once this done and I open 
> my bitmap (through the code), during the open operation, an .ovr file 
> will be searched and found. How we know from the .ovr (tiff) that the 
> overviews there are those of band2 ? If one can explain how bands 
> overviews are linked to their original bands it will be much appreciated.

You can't generate overviews only for one band if the overview format
is TIFF.  I believe you can if the overview format is .rrd (Erdas Imagine).

> Also, is there any details about the overviews storage within a Tiff, 
> are they simply bands or have a different storage mechanism ?

It is a normal image, but the overview image directories in a
TIFF file will have the "Subfile Type" set to reduced-resolution
image.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org




More information about the Gdal-dev mailing list