[gdal-dev] Question regarding overviews
lee heng hock
xingfu81 at gmail.com
Wed Feb 27 04:38:39 EST 2008
Hi,
I like to clarify my understanding on the concept of overviews.
Say if i have a geotif map 300 pix by 300 pix, then if i build a overview
giving a decimation factor of 2, I will get a map 150 pix by 150 pix. This
is so because 1/2 of the amount of pixels along its width and 1/2 of it
along its height are being thrown away, thus resulting in a map with 1/4 the
original map size in terms of total number of pixels.
Did I get my concept right?
Thanks again..
Heng Hock
On Fri, Feb 22, 2008 at 11:08 PM, Frank Warmerdam <warmerdam at pobox.com>
wrote:
> 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<http://pobox.com/%7Ewarmerdam>
> and watch the world go round - Rush | President OSGeo, http://osgeo.org
>
>
--
Regards
Heng Hock
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080227/84ab782f/attachment-0001.html
More information about the gdal-dev
mailing list