[gdal-dev] Benefit of using

Even Rouault even.rouault at mines-paris.org
Tue Nov 24 14:00:10 EST 2009

Jukka Rahkonen a écrit :

I guess the main reason was to invalidate existing overviews when the 
content of the full resolution has changed.
See http://trac.osgeo.org/gdal/ticket/2915 for the history of this feature.

For external overviews, either in GeoTIFF format (.ovr), or in HFA 
Imagine format (.aux / .rrd), gdaladdo -clean destroys the external 
overview file.

For internal overviews in TIFF, it can't shrink the file. This would 
require libtiff to support a kind of "compaction" operation, which it 
doesn't. Currently, it just "unlinks" the IFDs corresponding to the 
overviews from the chain of IFDs thus leaving holes in the file. I've 
also observed similar behaviour for internal HFA Imagine datasets.

But for database drivers, gdaladdo -clean can also free space. For 
example, for the (trunk) rasterlite driver, gdaladdo -clean + ogrinfo 
-sql "vacuum" results in a file that has the same size as before adding 
the overviews.

> Hi,
> What is the benefit of using gdaladdo with option -clean?  I created
> accidentally internal overviews instead of external and I was thinking that the
> -clean option must be a tool to get back to the starting point with no overviews
> and smaller file size. Hoever, -clean option is obviously made for some other
> purpose because it seems to wipe away overviews so that no program can utilise
> them, but still the file size remains the same.  For example
> - original tiff             355023 KB
> - with internal overviews   475209 KB
> - after gdaladdo -clean     475209 KB
> Is there any other way to get tiff file to its original size than to rewrite it
> with gdal_translate? It is fast but it means some manual delete/rename
> operations.
> -Jukka Rahkonen-
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

More information about the gdal-dev mailing list