Compile OTB with ZSTD
Description
When reading image compressed with zstd or lerc + zstd, gdal fails with the following lines:
[laurentt@trexvisu03 ~]$ otbcli_BandMath -il lerc_zstd.tiff -out test.tiff -exp "im1b1"
2025-08-04 13:43:45 (INFO): Loading metadata from official product
2025-08-04 13:43:45 (INFO) BandMath: Default RAM limit for OTB is 256 MB
2025-08-04 13:43:45 (INFO) BandMath: GDAL maximum cache size is 1024 MB
2025-08-04 13:43:45 (INFO) BandMath: OTB will use at most 128 threads
2025-08-04 13:43:45 (INFO) BandMath: Image #1 has 4 components
2025-08-04 13:43:45 (INFO): Estimated memory for full processing: 647.9MB (avail.: 256 MB), optimal image partitioning: 3 blocks
2025-08-04 13:43:45 (INFO): File test.tiff will be written in 4 blocks of 2444x2048 pixels
Writing test.tiff...: 0% [ ]ERROR 1: LERCPreDecode:ZSTD support missing
ERROR 1: TIFFReadEncodedTile() failed.
ERROR 1: lerc_zstd.tiff, band 1: IReadBlock failed at X offset 0, Y offset 0: TIFFReadEncodedTile() failed.
2025-08-04 13:43:45 (FATAL) BandMath: itk::ERROR: GDALImageIO(0x7832b0): Error while reading image (GDAL format) 'lerc_zstd.tiff' : lerc_zstd.tiff, band 1: IReadBlock failed at X offset 0, Y offset 0: TIFFReadEncodedTile() failed.
Definition of Ready
Generic:
-
Issue complexity evaluated -
Priority of issue evaluated -
If there is specific test data needed, it should be detailed and available -
If there is a specific documentation/specification need, it should be available to the development team -
Time during the sprint to realize this issue
Specific:
-
zstd + lerc compressed tif image
Definition of Done
Generic:
-
No test regression on CI -
Code reviewed by peers -
Code cleaned, no "debug" traces or "TODO" comments kept. -
New code documented
Specific:
-
otb able to read an LERC + ZSTD compressed image
Edited by Tristan Laurent