Skip to content

Commit

Permalink
Merge pull request #59 from kartoza/fix/cog-creation
Browse files Browse the repository at this point in the history
Fix/cog creation
  • Loading branch information
danangmassandy committed Aug 23, 2024
2 parents 71e4d45 + 9873dc0 commit f5ee771
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions django_project/cplus_api/utils/worker_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,12 @@ def create_and_upload_output_layer(
)
result = subprocess.run(
(
f'gdal_translate -of COG -co COMPRESS=DEFLATE'
f' "{file_path}" "{final_output_path}"'
f'gdal_translate -of COG -co COMPRESS=DEFLATE '
f'-co RESAMPLING=BILINEAR '
f'-co OVERVIEW_RESAMPLING=NEAREST '
f'-co NUM_THREADS=ALL_CPUS '
f'-co BLOCKSIZE=512 '
f'"{file_path}" "{final_output_path}"'
),
shell=True,
capture_output=True
Expand Down

0 comments on commit f5ee771

Please sign in to comment.