Skip to content

Commit d497708

Browse files
committed
ci: add tests for zstd
1 parent 6e65842 commit d497708

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

test/data/setup_data.sh

+2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ gdal_translate -of GTiff -co COMPRESS=LERC -co MAX_Z_ERROR=1000 stripped.tiff le
2626
gdal_translate -of GTiff -co COMPRESS=LERC -co MAX_Z_ERROR=1000 -co INTERLEAVE=BAND stripped.tiff lerc_interleave.tiff
2727
gdal_translate -of GTiff -co COMPRESS=LERC_DEFLATE -co MAX_Z_ERROR=1000 stripped.tiff lerc_deflate.tiff
2828
gdal_translate -of GTiff -co COMPRESS=LERC_ZSTD -co MAX_Z_ERROR=1000 stripped.tiff lerc_zstd.tiff
29+
gdal_translate -of GTiff -co COMPRESS=ZSTD stripped.tiff zstd.tiff
2930
gdal_translate -of GTiff -ot Float32 -co COMPRESS=LERC -co MAX_Z_ERROR=1000 stripped.tiff float32lerc.tiff
3031
gdal_translate -of GTiff -ot Float32 -co COMPRESS=LERC -co MAX_Z_ERROR=1000 -co INTERLEAVE=BAND stripped.tiff float32lerc_interleave.tiff
3132
gdal_translate -of GTiff -ot Float32 -co COMPRESS=LERC_DEFLATE -co MAX_Z_ERROR=1000 stripped.tiff float32lerc_deflate.tiff
3233
gdal_translate -of GTiff -ot Float32 -co COMPRESS=LERC_ZSTD -co MAX_Z_ERROR=1000 stripped.tiff float32lerc_zstd.tiff
34+
gdal_translate -of GTiff -ot Float32 -co COMPRESS=ZSTD stripped.tiff float32zstd.tiff
3335

3436
gdal_translate -of COG initial.tiff cog.tiff
3537

test/geotiff.spec.js

+10
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@ describe('GeoTIFF', () => {
248248
await performTiffTests(tiff, 539, 448, 15, Uint16Array);
249249
});
250250

251+
it('should work on Zstandard compressed tiffs', async () => {
252+
const tiff = await GeoTIFF.fromSource(createSource('zstd.tiff'));
253+
await performTiffTests(tiff, 539, 448, 15, Uint16Array);
254+
});
255+
251256
it('should work on Float32 and LERC compressed tiffs', async () => {
252257
const tiff = await GeoTIFF.fromSource(createSource('float32lerc.tiff'));
253258
await performTiffTests(tiff, 539, 448, 15, Float32Array);
@@ -268,6 +273,11 @@ describe('GeoTIFF', () => {
268273
await performTiffTests(tiff, 539, 448, 15, Float32Array);
269274
});
270275

276+
it('should work on Float32 and Zstandard compressed tiffs', async () => {
277+
const tiff = await GeoTIFF.fromSource(createSource('float32zstd.tiff'));
278+
await performTiffTests(tiff, 539, 448, 15, Float32Array);
279+
});
280+
271281
it('should work with worker pool', async () => {
272282
const testPool = new Pool();
273283
const tiff = await GeoTIFF.fromSource(createSource('nasa_raster.tiff'));

0 commit comments

Comments
 (0)