[gdal-dev] Question regarding overviews

Frank Warmerdam warmerdam at pobox.com
Fri Feb 22 10:08:24 EST 2008


lee heng hock wrote:
> Hi,
>  
> Issue1:
> Can we build overviews on a paletted geotiff map? or it has to apply 
> only to rgb maps?

Lee,

Yes, but you must be careful only to use the default nearest neighbour
resampling with non-continuous paletted images, not averaging, when
building the overviews.

> Issue2 :
> I have a georeferenced geotiff map (with only 1 raster band) which is 
> large in size probably a few hundred Mb which i like to load in my app. 
> So i use GDALBuildOverviews to build overviews so that I can load lower 
> resolution maps at smaller scales to beef up performance.
>  
> However, I noticed that after the building process is done, when i do this:
> rasterband->GetOverviewCount(), the result is not 0 which is normal 
> since i built overviews.
>  
> But when I do:
> rasterband->GetOverview(0)->GetOverviewCount(); the overview count is 
> also not 0. Why is this so ? shouldnt there be just one layer of overviews?

Hmm, I thought I avoided representing non-base layers as having overviews,
but apparently not.  My advice to you is to ignore this and just don't ask
overviews if they have overviews.  But I would also encourage you to file
a ticket on this issue so that the GTiff driver can be fixed up to behave
more appropriately.

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 OSGeo, http://osgeo.org



More information about the gdal-dev mailing list