From 7520eff0fd3f257b7d30989160578af304e09bf9 Mon Sep 17 00:00:00 2001 From: simondreutter <simon.dreutter@awi.de> Date: Fri, 13 Sep 2024 13:05:38 +0200 Subject: [PATCH] introduce DEFLATE compression --- process/7_create_basemaps.py | 10 ---------- process/config.py | 10 ++++++++-- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/process/7_create_basemaps.py b/process/7_create_basemaps.py index f94c5bf..7cbe217 100644 --- a/process/7_create_basemaps.py +++ b/process/7_create_basemaps.py @@ -39,16 +39,6 @@ import textwrap # import AWI Basemap configuration from config import * -# ============================================================================ -# GLOBAL VARIABLES -# ============================================================================ - -# GDAL creation options for final result -GDAL_CREATE_OPTIONS_FINAL = '-co TILED=YES -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co COPY_SRC_OVERVIEWS=FALSE -co COMPRESS=NONE -co BIGTIFF=IF_NEEDED' - -# Method to create overviews -OVERVIEW_METHOD = 'cubic' - # ============================================================================ # FUNCTIONS diff --git a/process/config.py b/process/config.py index 775ef01..ee1270d 100644 --- a/process/config.py +++ b/process/config.py @@ -372,8 +372,7 @@ SERVICE_CONF_FILE = PATH_RESULT / 'service.conf' # The following settings are operational parameters for the process. If the # temporary GeoTIFFs created by GDAL shall be created with different create -# options, they can be adjusted below. The create options for the final -# results, however, are specified in the last python script. +# options, they can be adjusted below. # GDAL creation options # GDAL_CREATE_OPTIONS = '-co COMPRESS=NONE -co BIGTIFF=IF_NEEDED' @@ -388,6 +387,13 @@ GDAL_CREATE_OPTIONS_PY = '--co COMPRESS=DEFLATE --co PREDICTOR=2 --co ZLEVEL=9 - # GDAL warp options WARP_OPTIONS = '-wo SOURCE_EXTRA=1000 -et 0' +# GDAL creation options for final result +# GDAL_CREATE_OPTIONS_FINAL = '-co TILED=YES -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co COPY_SRC_OVERVIEWS=FALSE -co COMPRESS=NONE -co BIGTIFF=IF_NEEDED' +GDAL_CREATE_OPTIONS_FINAL = '-co TILED=YES -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co COPY_SRC_OVERVIEWS=FALSE -co COMPRESS=DEFLATE -co PREDICTOR=2 -co ZLEVEL=9 -co BIGTIFF=IF_NEEDED' + +# Method to create overviews +OVERVIEW_METHOD = 'cubic' + # ============================================================================ # RUN FUNCTION -- GitLab