[Gdal-dev] Overviews questions

Jeff L. nf10 at hotmail.com
Tue Mar 21 11:07:54 EST 2006


Thanks Frank for your response and your insights.

So one need to build overviews for all the bands if the used overview format 
is tiff: Ok.

I'm still a bit unclear about the internal storage of the overviews within a 
tiff. You mentioned that an overview .ovr file is a 'normal' image. Does is 
have any 'normal' bands (full resolution) or only reduced resolutions ? Can 
you please explain ? (If i run a 'gdalinfo' on an .ovr it stated that it has 
one band with attached overviews).

Once an .ovr file is created and the base file (.bmp for instance) is opened 
programmatically, there is a check for the .ovr file existence. If the .ovr 
is found how we get the overview count (number of overviews) for each band ? 
(Will it be the same for all the bands ?) Is it stored with the .ovr or we 
deduce it (example: base dataset has 3 bands and the .ovr has 12 'bands' --> 
12/3 : 4 overviews for each band ?).

Last question: how the overviews are stored within the tiff ? From your 
response I understood
that there will a be a set of 'images' within the tiff. Every image 
correspond to an overview level and has all the bands. To simplify the 
picture, this would look like:

image1:
  overview level 1 for band1
  overview level 1 for band2
  overview level 1 for band3
  .... overview level 1 for last band

image2:
overview level 2 for band1
overview level 2 for band2
overview level 2 for band3
.....

Where level 1 can be 2, 4, 6 or any even number

Please correct if this schema is not correct.

Sorry about asking many questions as I'm trying to understand the details 
about 'overviews' within GDAL.

Thanks

Jeff





>From: Frank Warmerdam <warmerdam at pobox.com>
>To: "Jeff L." <nf10 at hotmail.com>
>CC: gdal-dev at lists.maptools.org
>Subject: Re: [Gdal-dev] Overviews questions
>Date: Tue, 21 Mar 2006 10:26:34 -0500
>
>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