[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GDAL COG+LERC compression



Hi Even,
just before reading your reply I opened an issue on the libtiff issue tracker [1].
If you thing that the request makes sense I can also try to implement it and open a merge request.

Of course I suppose that updating libtiff is a by far slower process than the solution you suggest in your reply.


On 17 Sep 2020, at 21:08, Even Rouault <even.rouault@spatialys.com> wrote:

On jeudi 17 septembre 2020 20:26:59 CEST Sebastiaan Couwenberg wrote:
> On 9/17/20 7:56 PM, Antonio Valentino wrote:
> > today I tried to made some tests to generate Cloud Optimized Geotiff
> > (COG) files with LERC compression.
> >
> > I realized that this is not possible in debian because, if I understand
> > correctly, we build GDAL using system libtiff while the LERC compressor,
> > according to [1], need the internal libtiff.
>
> Yes, and that's somewhat broken by design.
>
> libtiff should expose the features required by GDAL for this. IIRC GDAL
> uses a private header currently.

 

One potential one way forward would be that Debian provides a libtiff-private-dev package (similarly to libpoppler-private-dev) with the "tiffiop.h" header, and then GDAL build logic could be modified to use it. At least that's the theory. I haven't tried (TM)

 

> > The strange thing, to me, is that the same limitation also applies to
> > the the ZSTD compressor [1], but in this case I'm perfectly able to
> > generate COG files with ZSTD compression in debian.

 

That isn't the same situation. The ZSTD codec is in official libtiff, so I assume Debian libtiff is built with ZSTD support, hence you get in GDAL.

Yes, now I realised it, but the documentation [2] is a little bit misleading:

"ZSTD is available when using internal libtiff and if GDAL built against libzstd >=1.0, or if built against external libtiff with zstd support.”


The option to linking against an external libtiff >= 4.0.10 is not currently mentioned that’s why I was a little bit surprised.


[1] https://gitlab.com/libtiff/libtiff/-/issues/213



Kind regards

--
Antonio Valentino


Reply to: