From 52ac8b77d7e8bd433db157dbd0bf3c665ad9f25e Mon Sep 17 00:00:00 2001 From: Sharon Fitzpatrick Date: Wed, 8 Nov 2023 15:59:42 -0800 Subject: [PATCH] update SDS_download to coastsat latest --- src/coastsat/SDS_download.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coastsat/SDS_download.py b/src/coastsat/SDS_download.py index 6916af0..f808ed8 100644 --- a/src/coastsat/SDS_download.py +++ b/src/coastsat/SDS_download.py @@ -1512,7 +1512,8 @@ def filter_S2_collection(im_list): if len(np.unique(utm_zones)) == 1: return im_list else: - utm_zone_selected = np.max(np.unique(utm_zones)) + idx_max = np.argmax([np.sum(utm_zones == _) for _ in np.unique(utm_zones)]) + utm_zone_selected = np.unique(utm_zones)[idx_max] # find the images that were acquired at the same time but have different utm zones idx_all = np.arange(0, len(im_list), 1) idx_covered = np.ones(len(im_list)).astype(bool)