-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I'm currently testing the output from the cog conversion when changing compression, predictor, overview_sampling etc. I ran into an issue that will likely change our current cog conversion script. Current script prints out:
Warning in x@cpp$writeRaster(opt) :
GDAL Message 6: driver MEM does not support creation option COMPRESS
Warning in x@cpp$writeRaster(opt) :
GDAL Message 6: driver MEM does not support creation option PREDICTOR
Warning in x@cpp$writeRaster(opt) :
GDAL Message 6: driver MEM does not support creation option BLOCKSIZE
So the creation options are ignored. Using gdal_translate() solved the warning.
gdal_translate( src_dataset = "/home/shares/wwri-wildfire/MEDS-2026/wri-data-processing/data/WRI_score.tif", dst_dataset = "/home/shares/wwri-wildfire/MEDS-2026/wri-data-processing/data/WRI_score_cog.tif", of = "COG", co = c( "COMPRESS=DEFLATE", "PREDICTOR=3", "BLOCKSIZE=512", "RESAMPLING=AVERAGE" ))
@rellimylime @FlukeAndFeather