Skip to content

Instantly share code, notes, and snippets.

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