From 7857e1bc6b287d534b3a803d44b6797ac8b605d7 Mon Sep 17 00:00:00 2001 From: BRAUN REMI Date: Fri, 28 Feb 2025 13:39:13 +0100 Subject: [PATCH] FIX: Save Cosmo quicklooks as PNG instead of GeoTiffs as they are not georeferenced --- CHANGES.md | 1 + eoreader/products/sar/cosmo_product.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 27aec9ad..848db267 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -28,6 +28,7 @@ - **ENH: Write intermediary files as COG by default and add a environment variable `EOREADER_DEFAULT_DRIVER` to overload the default driver** ([#181](https://github.com/sertit/eoreader/issues/181)) - **ENH: Add a `path` attribute to the bands, corresponding to their path on disk** - FIX: Fix toa radiance to toa reflectance computation for VHR data +- FIX: Save Cosmo quicklooks as PNG instead of GeoTiffs as they are not georeferenced - DOC: Add documentation on how EOReader can improve your data handling ([#108](https://github.com/sertit/eoreader/issues/108)) - DEPS: Add `ephem` for computing earth-sun distance (according to Maxar's method from docs) diff --git a/eoreader/products/sar/cosmo_product.py b/eoreader/products/sar/cosmo_product.py index 91cb4a7f..bd1ff836 100644 --- a/eoreader/products/sar/cosmo_product.py +++ b/eoreader/products/sar/cosmo_product.py @@ -421,7 +421,7 @@ def get_quicklook_path(self) -> str: Returns: str: Quicklook path """ - qlk_path, qlk_exists = self._get_out_path(f"{self.condensed_name}_QLK.tif") + qlk_path, qlk_exists = self._get_out_path(f"{self.condensed_name}_QLK.png") if not qlk_exists: with rasterio.open(str(self._img_path)) as ds: quicklook_paths = [subds for subds in ds.subdatasets if "QLK" in subds] @@ -434,6 +434,7 @@ def get_quicklook_path(self) -> str: qlk_path, dtype=np.uint8, nodata=255, + driver="PNG", ) if len(quicklook_paths) > 1: LOGGER.info(