From 237b9f47b0311378cc8c4b4f37c0e1481299cc7a Mon Sep 17 00:00:00 2001 From: BRAUN REMI Date: Thu, 17 Oct 2024 13:54:02 +0200 Subject: [PATCH] FIX: Fix (really) window's name coming from a vector with an underscore after it --- CHANGES.md | 4 ++++ eoreader/products/optical/optical_product.py | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 939a125a..a329a546 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Release History +## 0.21.5.post0 (2024-10-17) + +- FIX: Fix (really) window's name coming from a vector with an underscore after it + ## 0.21.5 (2024-10-17) - FIX: Fix window's name coming from a vector with an underscore after it diff --git a/eoreader/products/optical/optical_product.py b/eoreader/products/optical/optical_product.py index 5c6fcfce..b13fb373 100644 --- a/eoreader/products/optical/optical_product.py +++ b/eoreader/products/optical/optical_product.py @@ -665,12 +665,14 @@ def _get_clean_band_path( win_suffix = "" if window is not None: if path.is_path(window): - win_suffix = path.get_filename(window) + win_suffix = f"{path.get_filename(window)}" elif isinstance(window, gpd.GeoDataFrame): - win_suffix = f"{window.attrs.get('name')}_" + win_suffix = f"{window.attrs.get('name')}" if not win_suffix: - win_suffix = f"win{files.hash_file_content(str(window))}_" + win_suffix = f"win{files.hash_file_content(str(window))}" + + win_suffix += "_" return self._get_band_folder(writable).joinpath( f"{self.condensed_name}_{band.name}_{res_str.replace('.', '-')}_{win_suffix}{cleaning_method.value}{rad_proc}.tif",