Skip to content

Commit

Permalink
ci: add tests for zstd
Browse files Browse the repository at this point in the history
  • Loading branch information
Rdataflow committed Jan 8, 2025
1 parent 06dbf4f commit 516c9b9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/data/setup_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ gdal_translate -of GTiff -co COMPRESS=LERC -co MAX_Z_ERROR=1000 stripped.tiff le
gdal_translate -of GTiff -co COMPRESS=LERC -co MAX_Z_ERROR=1000 -co INTERLEAVE=BAND stripped.tiff lerc_interleave.tiff
gdal_translate -of GTiff -co COMPRESS=LERC_DEFLATE -co MAX_Z_ERROR=1000 stripped.tiff lerc_deflate.tiff
gdal_translate -of GTiff -co COMPRESS=LERC_ZSTD -co MAX_Z_ERROR=1000 stripped.tiff lerc_zstd.tiff
gdal_translate -of GTiff -co COMPRESS=ZSTD stripped.tiff zstd.tiff
gdal_translate -of GTiff -ot Float32 -co COMPRESS=LERC -co MAX_Z_ERROR=1000 stripped.tiff float32lerc.tiff
gdal_translate -of GTiff -ot Float32 -co COMPRESS=LERC -co MAX_Z_ERROR=1000 -co INTERLEAVE=BAND stripped.tiff float32lerc_interleave.tiff
gdal_translate -of GTiff -ot Float32 -co COMPRESS=LERC_DEFLATE -co MAX_Z_ERROR=1000 stripped.tiff float32lerc_deflate.tiff
gdal_translate -of GTiff -ot Float32 -co COMPRESS=LERC_ZSTD -co MAX_Z_ERROR=1000 stripped.tiff float32lerc_zstd.tiff
gdal_translate -of GTiff -ot Float32 -co COMPRESS=ZSTD stripped.tiff float32zstd.tiff

gdal_translate -of COG initial.tiff cog.tiff

Expand Down
10 changes: 10 additions & 0 deletions test/geotiff.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ describe('GeoTIFF', () => {
await performTiffTests(tiff, 539, 448, 15, Uint16Array);
});

it('should work on Zstandard compressed tiffs', async () => {
const tiff = await GeoTIFF.fromSource(createSource('zstd.tiff'));
await performTiffTests(tiff, 539, 448, 15, Uint16Array);
});

it('should work on Float32 and LERC compressed tiffs', async () => {
const tiff = await GeoTIFF.fromSource(createSource('float32lerc.tiff'));
await performTiffTests(tiff, 539, 448, 15, Float32Array);
Expand All @@ -268,6 +273,11 @@ describe('GeoTIFF', () => {
await performTiffTests(tiff, 539, 448, 15, Float32Array);
});

it('should work on Float32 and Zstandard compressed tiffs', async () => {
const tiff = await GeoTIFF.fromSource(createSource('float32zstd.tiff'));
await performTiffTests(tiff, 539, 448, 15, Float32Array);
});

it('should work with worker pool', async () => {
const testPool = new Pool();
const tiff = await GeoTIFF.fromSource(createSource('nasa_raster.tiff'));
Expand Down

0 comments on commit 516c9b9

Please sign in to comment.