From 1bc85d2172c8ccfdc1f8dc234c7dfc6a40066ffd Mon Sep 17 00:00:00 2001
From: Raffaele Gaetano <raffaele.gaetano@cirad.fr>
Date: Mon, 10 Jul 2023 16:21:40 +0200
Subject: [PATCH] RBK: issue with compress option in rasterio.

---
 OBIA/OBIABase.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/OBIA/OBIABase.py b/OBIA/OBIABase.py
index 90abe47..f8ded13 100644
--- a/OBIA/OBIABase.py
+++ b/OBIA/OBIABase.py
@@ -342,7 +342,9 @@ class OBIABase:
                 os.remove(output_file)
             mode = 'w+' if not os.path.exists(output_file) else 'r+'
             with rio.open(output_file, mode, driver='GTiff', width=self.W, height=self.H, crs=self.crs,
-                          transform=self.transform, count=1, dtype=np.uint16, compress=compress) as dst:
+                          transform=self.transform, count=1, dtype=np.uint16) as dst:
+                          # issue with compress option?
+                          #transform=self.transform, count=1, dtype=np.uint16, compress=compress) as dst:
                 win = Window(self.tiles[tilenum][0], self.tiles[tilenum][1],
                              self.tiles[tilenum][2], self.tiles[tilenum][3])
                 x = dst.read(1, window=win)
-- 
GitLab