[Gdal-dev] optimum overview settings?

Chapman, Martin MChapman at sanz.com
Fri Mar 12 14:57:12 EST 2004


Matt,

Also, be aware that if you are writing an ovr file, and an ovr file with
the same name exists, the gdal lib will append to the file, resulting in
a file with more ovr's than you expect.  Moral of the story...delete the
other ovr first.  I ran into this when I implemented ovr functionality
in my app.  Maybe it was my bad code, but it threw me for a loop for a
few hours.

Martin

-----Original Message-----
From: Chapman, Martin 
Sent: Friday, March 12, 2004 12:49 PM
To: gdal-dev at remotesensing.org
Subject: RE: [Gdal-dev] optimum overview settings?


Matt,

You can create whatever overviews you want in an ovr file, but they
definitely must be a power of two, so you can have 1, 2, 4, 8, 16, 32
,64 ,128 , 256, 512, 1024, 2048, 4096...ect...or 2, 16, 4096, or just 8.
Basically, each pyramid level is 1/4 the size of the pyramid level below
it and 4x the size of the pyramid level above it.  There is a point
though that when an image is scaled to 2x2, it makes no sense to reduce
it further.  You can dynamically figure out what pyramids make sense at
run time by using the width and height of the image in pixels.  Big
images may require smaller thumbnails to scale them down to something
small, whereas small images may not need to reduced that much.

I usually always create 12 pyramids because the further you go, the time
to create the pyramid is reduced by an order of magnitude.  So creating
anything past 8 or 16 is going to fast (usually).  The reason for all
the pyramids in my case is to handle scaling very large images down to
small thumbnails.  It really depends on your app, but definitely need to
be power of 2. 

Martin Chapman

-----Original Message-----
From: Matt Wilkie [mailto:matt.wilkie at gov.yk.ca] 
Sent: Friday, March 12, 2004 12:24 PM
To: gdal-dev at remotesensing.org
Subject: [Gdal-dev] optimum overview settings?


Hi Listers,

What is the optimum number of overviews versus file size when stored in 
geotiffs? And if the end goal is viewing perfomance, as measured by an 
application like ArcMap? Mapserver?

The gdal_utilities web page[0] gives "2 4 8 16" as an example, however 
significant file size savings can be realized if we use just 4-16. What 
is sacrificed by dropping 2?

Are powers of two just convenience? Would 3 9 18 36 work just as well?

And does the size of the image determine how many overview levels are 
useful? For example a 100mb image might not benefit much from an upper 
overview of 16, while a 3gb image might need to go all the way up 128 or

more.

Are there any guidelines for choosing overview levels?


[0] http://www.remotesensing.org/gdal/gdal_utilities.html

thanks for your time,

-- 
matt wilkie
--------------------------------------------
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
--------------------------------------------


_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev
_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev



More information about the Gdal-dev mailing list