Skip to content

Instantly share code, notes, and snippets.

@PratyushTripathy
Created September 4, 2021 11:25
Show Gist options
  • Save PratyushTripathy/b5f62d17ae64079fda776818e1a9a386 to your computer and use it in GitHub Desktop.
Save PratyushTripathy/b5f62d17ae64079fda776818e1a9a386 to your computer and use it in GitHub Desktop.
# define the output file names
mx_outfile = mx_file.replace('.tif', '_byte_deflate.tif')
sb_outfile = sb_file.replace('.tif', '_byte_deflate.tif')
# export the files
raster.export(arr_mx, ds_mx, filename=mx_outfile, dtype='uint8', compress='DEFLATE')
raster.export(arr_sb, ds_sb, filename=sb_outfile, dtype='uint8', compress='DEFLATE')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment