Skip to content

Commit

Permalink
fix: use multithreading for gdalwarp when creating COGS TDE-696 (#399)
Browse files Browse the repository at this point in the history
* fix: use multithreading for gdalwarp when creating COGS

* Update scripts/gdal/gdal_preset.py

Co-authored-by: paulfouquet <86932794+paulfouquet@users.noreply.github.com>

---------

Co-authored-by: paulfouquet <86932794+paulfouquet@users.noreply.github.com>
  • Loading branch information
blacha and paulfouquet authored Mar 21, 2023
1 parent d286602 commit 061d3d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/gdal/gdal_preset.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
# Ensure all CPUs are used for gdal translate
"-co",
"num_threads=all_cpus",
# Until GDAL 3.7.x this needs to be set as well as num_threads (https://github.com/OSGeo/gdal/issues/7478)
"--config",
"gdal_num_threads",
"all_cpus",
# If not all tiles are needed in the tiff, instead of writing empty images write a null byte
# this significantly reduces the size of tiffs which are very sparse
"-co",
Expand Down

0 comments on commit 061d3d6

Please sign in to comment.