Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for ZSTD compressor #372

Open
REASY opened this issue Jul 9, 2023 · 0 comments · May be fixed by #451
Open

Support for ZSTD compressor #372

REASY opened this issue Jul 9, 2023 · 0 comments · May be fixed by #451

Comments

@REASY
Copy link

REASY commented Jul 9, 2023

Currently when I try to open a ZSTD compressed GeoTIFF I'm getting the following error:

"Error: Unknown compression method identifier: 50000
    at getDecoder (http://localhost:8091/dist/main.js:16498:11)
    at GeoTIFFImage.readRasters (http://localhost:8091/dist/main.js:18190:97)
    at GeoTIFFImage.readRGB (http://localhost:8091/dist/main.js:18241:19)
    at MapView._callee3$ (http://localhost:8091/dist/main.js:1299:46)
    at tryCatch (http://localhost:8091/dist/main.js:109577:40)
    at Generator.invoke [as _invoke] (http://localhost:8091/dist/main.js:109815:22)
    at prototype.<computed> [as next] (http://localhost:8091/dist/main.js:109629:21)
    at step (http://localhost:8091/dist/main.js:1110:191)
    at http://localhost:8091/dist/main.js:1110:361"

The list of supported decoders by geotiff.js at the moment can be found here:

addDecoder([undefined, 1], () => import('./raw.js').then((m) => m.default));
addDecoder(5, () => import('./lzw.js').then((m) => m.default));
addDecoder(6, () => {
throw new Error('old style JPEG compression is not supported.');
});
addDecoder(7, () => import('./jpeg.js').then((m) => m.default));
addDecoder([8, 32946], () => import('./deflate.js').then((m) => m.default));
addDecoder(32773, () => import('./packbits.js').then((m) => m.default));
addDecoder(34887, () => import('./lerc.js').then((m) => m.default));
addDecoder(50001, () => import('./webimage.js').then((m) => m.default));

50000 is a reserved identifier for ZSTD: https://github.com/OSGeo/gdal/blob/301f31b9b74cd67edcdc555f7e7a58db87cbadb2/frmts/gtiff/gtiff.h#L117-L119

Rdataflow added a commit to Rdataflow/geotiff.js that referenced this issue Jan 8, 2025
@Rdataflow Rdataflow linked a pull request Jan 8, 2025 that will close this issue
Rdataflow added a commit to Rdataflow/geotiff.js that referenced this issue Jan 8, 2025
Rdataflow added a commit to Rdataflow/geotiff.js that referenced this issue Jan 8, 2025
Rdataflow added a commit to Rdataflow/geotiff.js that referenced this issue Jan 8, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant