TILEINDEX and overviews (gdaladdo) ?

Frank Warmerdam warmerdam at POBOX.COM
Thu Sep 29 10:00:17 EDT 2005


On 9/29/05, Manfred Zerndl <manfred.zerndl at bvv.bayern.de> wrote:
>
> Does mapserver not take advantage of overviews calculated with
> "gdaladdo" when
> the files are accessed with TILEINDEX?
>
> I have 77300 TIFF-Files. Each of them has 2500x2500 Pixels and each is
> equivalent to one square kilometer
> (Ground-resolution is 0.4 meters per pixel (1000 meters / 2500 pixels)).
>
> (by the way, creating a Tile-Index with gdaltindex failed, becuase of
> the amount of comand-line parameters.
> So I generated a tileindex-Shapefile for my own, calculated each
> bondingbox and used the tools "shpadd" and "dbfadd".)

Manfred,

The gdaltindex program can also be used to add files to an existing
index, so it is also possible to write a little script to invoke it once for
each tiff file.  Of course your solution is fine too.  The tileindex files
are deliberately simple so that they can be generated in a variety
of ways.


> Does mapserver not take advantage of the precalculated overviews in the
> tiff-files generated with "gdaladdo"
> when the files are accessed with TILEINDEX?

Frederic's analysis was exactly right.  The problem is that accessing
many TIFF files invoves quite a bit of overhead and this is what is
killing you.  My suggestion would be to generate enough overview
levels in the TIFF files to handle up to roughly the point at which a
map view is going to show 9 files.  Above that you should consider
having a single overview file.

So a 500x500 view on a 3x3 set of 2500x2500 files would need 15:1
decimation.  So I would generate the 2x, 4x, 8x and 16x overviews
and then look at generating a merged overview layer at the 32x
resolution.  So this merged overview layer would have a resolution of
12.8/pixel.  Such a merged file for your whole region would be roughly
1.4GB according to my calculations.  A managable size for a TIFF file.
Then make sure you add overviews on that.

The key thing to keep in mind is that these sorts of overview layers are
only really necessary when it helps avoid accessing alot of files for one
map view.  I would add it would be helpful to merge your tiles into bigger
files.  For instance, if you merged 8x8 sets of your tiles into single TIFF
files then you could add three more levels of overview in the base files
and reduce the required resolution of your overview layer correspondingly.

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    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list