Skip to content

Commit

Permalink
FIX: Fix (really) window's name coming from a vector with an undersco…
Browse files Browse the repository at this point in the history
…re after it
  • Loading branch information
remi-braun committed Oct 17, 2024
1 parent c651df6 commit 237b9f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 5 additions & 3 deletions eoreader/products/optical/optical_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 237b9f4

Please sign in to comment.