From 50858d8241e96ed5486600e93cd840f3806b1bd4 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Wed, 29 Jan 2020 08:13:11 -0500 Subject: [PATCH] Disable web_optimizated while converting cogeos --- app/cogeo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/cogeo.py b/app/cogeo.py index 43ef2c86..3ec30d01 100644 --- a/app/cogeo.py +++ b/app/cogeo.py @@ -62,7 +62,9 @@ def assure_cogeo(src_path): cog_translate(dst, tmpfile, output_profile, nodata=nodata, config=config, in_memory=False, - quiet=True, web_optimized=True) + quiet=True, web_optimized=False) + # web_optimized reduces the dimension of the raster, as well as reprojecting to EPSG:3857 + # we want to keep resolution and projection at the tradeoff of slightly slower tile render speed if os.path.isfile(tmpfile): shutil.move(src_path, swapfile) # Move to swap location