From 9b68e35bde4785bae556cf67acadd5c7eea6abb9 Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Mon, 4 Nov 2024 19:51:23 -0500 Subject: [PATCH] Support BigTIFF for image_to_cog --- leafmap/common.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/leafmap/common.py b/leafmap/common.py index 6b39a39b59..f110f6b8ed 100644 --- a/leafmap/common.py +++ b/leafmap/common.py @@ -3752,6 +3752,10 @@ def image_to_cog(source, dst_path=None, profile="deflate", **kwargs): dst_path = check_file_path(dst_path) dst_profile = cog_profiles.get(profile) + if "dst_kwargs" in kwargs: + dst_profile.update(kwargs.pop("dst_kwargs")) + + dst_profile["BIGTIFF"] = "IF_NEEDED" cog_translate(source, dst_path, dst_profile, **kwargs)