From 5aea15d474f6fedb294161fb83ade09e7f5bc8be Mon Sep 17 00:00:00 2001 From: Justin Terry Date: Mon, 19 Aug 2024 15:55:46 -0700 Subject: [PATCH] Set SPARSE_OK=TRUE for COGs --- batch/scripts/cogify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/batch/scripts/cogify.sh b/batch/scripts/cogify.sh index 3fb2d40b..2d44efe8 100755 --- a/batch/scripts/cogify.sh +++ b/batch/scripts/cogify.sh @@ -38,7 +38,7 @@ else fi # convert to COG using existing overviews, this adds some additional layout optimizations -gdal_translate "${IMPLEMENTATION}_merged.tif" "${IMPLEMENTATION}.tif" -of COG -co COMPRESS=DEFLATE -co BLOCKSIZE="${BLOCK_SIZE}" -co BIGTIFF=IF_SAFER -co NUM_THREADS=ALL_CPUS -co OVERVIEWS=FORCE_USE_EXISTING --config GDAL_CACHEMAX 70% --config GDAL_NUM_THREADS ALL_CPUS +gdal_translate "${IMPLEMENTATION}_merged.tif" "${IMPLEMENTATION}.tif" -of COG -co COMPRESS=DEFLATE -co BLOCKSIZE="${BLOCK_SIZE}" -co BIGTIFF=IF_SAFER -co NUM_THREADS=ALL_CPUS -co OVERVIEWS=FORCE_USE_EXISTING -co SPARSE_OK=TRUE --config GDAL_CACHEMAX 70% --config GDAL_NUM_THREADS ALL_CPUS # upload to data lake aws s3 cp "${IMPLEMENTATION}.tif" "${TARGET}"