Skip to content

Commit

Permalink
fix: gdal should not create bigtiff TDE-805 (linz#632)
Browse files Browse the repository at this point in the history
* fix: gdal should not create bigtiff TDE-805

* ci: update test data

* ci: fix elevation output
  • Loading branch information
paulfouquet authored Sep 1, 2023
1 parent 78e9e82 commit b33825f
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions scripts/gdal/gdal_preset.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
# this significantly reduces the size of tiffs which are very sparse
"-co",
"sparse_ok=true",
# Force everything into big tiff
# this converts all offsets from 32bit to 64bit to support TIFFs > 4GB in size
# Do not create BIGTIFF
# An error will be raise by GDAL if it fails creating a tiff > 4GB in size
"-co",
"bigtiff=yes",
"bigtiff=no",
]

DEM_LERC = [
Expand Down
6 changes: 3 additions & 3 deletions scripts/gdal/tests/gdal_preset_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def test_preset_webp() -> None:
assert "COG" in gdal_command
assert "blocksize=512" in gdal_command
assert "num_threads=all_cpus" in gdal_command
assert "bigtiff=yes" in gdal_command
assert "bigtiff=no" in gdal_command

# Webp lossless
assert "compress=webp" in gdal_command
Expand All @@ -29,7 +29,7 @@ def test_preset_lzw() -> None:
assert "COG" in gdal_command
assert "blocksize=512" in gdal_command
assert "num_threads=all_cpus" in gdal_command
assert "bigtiff=yes" in gdal_command
assert "bigtiff=no" in gdal_command

# LZW compression
assert "compress=lzw" in gdal_command
Expand All @@ -49,7 +49,7 @@ def test_preset_dem_lerc() -> None:
assert "COG" in gdal_command
assert "blocksize=512" in gdal_command
assert "num_threads=all_cpus" in gdal_command
assert "bigtiff=yes" in gdal_command
assert "bigtiff=no" in gdal_command

# LERC compression
assert "compress=lerc" in gdal_command
Expand Down
Binary file modified scripts/tests/data/output/BG35_1000_4829.tiff
Binary file not shown.
Binary file modified scripts/tests/data/output/BG35_1000_4829_cut.tiff
Binary file not shown.
Binary file modified scripts/tests/data/output/BK39_10000_0101.tiff
Binary file not shown.
Binary file modified scripts/tests/data/output/BK39_10000_0102.tiff
Binary file not shown.
Binary file modified scripts/tests/data/output/BQ31_5000_0608.tiff
Binary file not shown.

0 comments on commit b33825f

Please sign in to comment.