[gdal-dev] gdaladdo problems with compression

Even Rouault even.rouault at spatialys.com
Mon Sep 14 04:52:16 PDT 2015


Le lundi 14 septembre 2015 13:38:42, Stefan Ziegler a écrit :
> Thanks Even.
> 
> I was afraid that there will be no compression applied at all but this
> behaviour is fine.
> 
> The geotiff where I add the overviews is the result of a gdalwarp process
> (tiled, deflate, preditor=2). When I gdal_translate this geotiff with the
> very same compression parameters I gain approx. 10 percent space. Sounds
> this comprehensible? (I'm pretty sure there was once some discussion on the
> mailing list but couldn't find anything).

Yes, see https://trac.osgeo.org/gdal/wiki/UserDocs/GdalWarp#GeoTIFFoutput-coCOMPRESSisbroken

> 
> regards
> Stefan
> 
> On Mon, Sep 14, 2015 at 11:56 AM, Even Rouault <even.rouault at spatialys.com>
> 
> wrote:
> > Le lundi 14 septembre 2015 11:46:45, Stefan Ziegler a écrit :
> > > Hi
> > > 
> > > we are facing problems with the compression of the overviews we are
> > 
> > adding
> > 
> > > with gdaladdo. The filesize does not differ whether we are using
> > > compression parameters or not. The filesize of the input raster is
> > 
> > approx.
> > 
> > > 100 mb. The following both commands resulting in an identical filesize
> > > of approx. 140mb.
> > > 
> > > gdaladdo -r average  591252_12_5cm.tif 2 4 8 16 32
> > > 
> > > gdaladdo -r average --config COMPRESS_OVERVIEW JPEG --config
> > > PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL
> > > 591252_12_5cm.tif 2 4 8 16 32
> > 
> > Stefan,
> > 
> > The config options are only used for external overviews (-ro flag). For
> > internal
> > overviews, the same compression scheme as the full resolution image is
> > used.
> > In theory they could also use a different compression scheme, but this
> > isn't
> > currently implemented.
> > 
> > Even
> > 
> > > The input raster is tiled and compressed with deflate (and predictor=2)
> > > 
> > > I would expect that the latter one would be smaller. Did we
> > > misunderstand something? Or do we use the parameters the wrong way?
> > > 
> > > GDAL 1.11.2 and dev.
> > > 
> > > regards
> > > Stefan
> > 
> > --
> > Spatialys - Geospatial professional services
> > http://www.spatialys.com

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list