Skip to content

Commit

Permalink
FIX: Save Cosmo quicklooks as PNG instead of GeoTiffs as they are not…
Browse files Browse the repository at this point in the history
… georeferenced
  • Loading branch information
remi-braun committed Feb 28, 2025
1 parent a58e6a5 commit 7857e1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 2 additions & 1 deletion eoreader/products/sar/cosmo_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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(
Expand Down

0 comments on commit 7857e1b

Please sign in to comment.