From 025bf52d3b8e7444ed26c23f170b68ad22871762 Mon Sep 17 00:00:00 2001 From: BRAUN REMI Date: Wed, 22 Jan 2025 17:13:55 +0100 Subject: [PATCH] FIX: Fix Sentinel-2 Theia footprints when the nodata area is wider than the data area #201 --- CHANGES.md | 4 ++++ eoreader/products/optical/s2_theia_product.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index e9576e0b..dc4400e6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Release History +## 0.21.10 (2024-mm-dd) + +- FIX: Fix Sentinel-2 Theia footprints when the nodata area is wider than the data area ([#201](https://github.com/sertit/eoreader/issues/201)) + ## 0.21.9 (2024-01-22) - FIX: Better management of temporary directories (name, cleaning, etc) diff --git a/eoreader/products/optical/s2_theia_product.py b/eoreader/products/optical/s2_theia_product.py index b44c7fdf..44903b9b 100644 --- a/eoreader/products/optical/s2_theia_product.py +++ b/eoreader/products/optical/s2_theia_product.py @@ -230,7 +230,7 @@ def footprint(self) -> gpd.GeoDataFrame: mask = utils.read(edg_path, masked=False) # Vectorize the nodata band - footprint = rasters.vectorize(mask, values=0, default_nodata=-1) + footprint = rasters.vectorize(mask, values=0, default_nodata=1) footprint = geometry.get_wider_exterior(footprint) footprint.geometry = footprint.geometry.convex_hull