From 16819bf82ac1fa9f3f8a8b1da8e54a3a53e2f1ef Mon Sep 17 00:00:00 2001 From: Felipe Date: Mon, 27 Nov 2023 15:21:51 +0000 Subject: [PATCH 1/2] fix integer overflow bug --- R/api_segments.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/R/api_segments.R b/R/api_segments.R index fb54e8364..f61429305 100755 --- a/R/api_segments.R +++ b/R/api_segments.R @@ -398,9 +398,10 @@ progress) { # how much memory do we need? - req_memory <- .tile_nrows(tile) * .tile_ncols(tile) * - length(.tile_timeline(tile)) * length(bands) * 4 * - .conf("processing_bloat_seg") / 1e+09 + # Get image size + req_memory <- .as_dbl(.tile_nrows(tile)) * .as_dbl(.tile_ncols(tile)) + req_memory <- req_memory * length(.tile_timeline(tile)) * + length(bands) * 4 * .conf("processing_bloat_seg") / 1e+09 # do we have enough memory? if (req_memory < memsize) { From cfe8fcaa9371dc954fe6528e5b2541aa73f7d059 Mon Sep 17 00:00:00 2001 From: Felipe Date: Tue, 28 Nov 2023 12:31:40 +0000 Subject: [PATCH 2/2] update hotfix version metadata --- DESCRIPTION | 2 +- NEWS.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 59cb7137b..c0ec9bee6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: sits Type: Package -Version: 1.4.2-1 +Version: 1.4.2-2 Title: Satellite Image Time Series Analysis for Earth Observation Data Cubes Authors@R: c(person('Rolf', 'Simoes', role = c('aut'), email = 'rolf.simoes@inpe.br'), person('Gilberto', 'Camara', role = c('aut', 'cre'), email = 'gilberto.camara.inpe@gmail.com'), diff --git a/NEWS.md b/NEWS.md index 58bd89298..0d48b653e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,9 @@ # What's new in SITS version 1.4 +### Hotfix version 1.4.2-2 +* Fix integer overflow bug in `sits_classify()` segments + ### Hotfix version 1.4.2-1 * Fix crs bug in `sits_apply()` * Update file name in clean feature