xdem
xdem copied to clipboard
COG format
Context
In this ticket, we want to add the ability to save our images in the COG format. The COG (Cloud Optimized GeoTIFF) format is an extension of the GeoTIFF format, designed to be optimized for storage and access in the cloud.
Code
We need to modify the dem_coregistration function to allow saving in COG format.
To do this, add a boolean parameter save_cog that modifies the save function [here](https://github.com/GlacioHack/xdem/blob/main/xdem/coreg/workflows.py#L365) to:
# Save coregistered DEM
if out_dem_path is not None:
dem_coreg.save(out_dem_path, tiled=True, driver="COG")
Tests
Conduct internal tests.