Skip to content

Commit 743c83b

Browse files
committed
Fix reclassify bug when mask covers partially the classified tile
1 parent 7a8bb49 commit 743c83b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

R/api_reclassify.R

+4
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@
8989
)
9090
# Evaluate expressions
9191
values <- reclassify_fn(values = values, mask_values = mask_values)
92+
# Does values is valid? In case of a matrix with integer(0) values
93+
if (!.has(values)) {
94+
values <- rep(NA, .block_size(block))
95+
}
9296
offset <- .offset(band_conf)
9397
if (.has(offset) && offset != 0) {
9498
values <- values - offset

0 commit comments

Comments
 (0)