Skip to content

Commit

Permalink
fix empty blocks bug in .raster_merge_blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
OldLipe committed Apr 22, 2024
1 parent 9a8ab16 commit 3b52d8f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/api_apply.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,9 @@
# Get band configuration
band_conf <- .tile_band_conf(tile = feature, band = out_band)
if (.has_not(band_conf)) {
band_conf <- .conf("default_values", "FLT4S")
if (normalized)
band_conf <- .conf("default_values", "INT2S")
else
band_conf <- .conf("default_values", "FLT4S")
}
# Process jobs sequentially
block_files <- .jobs_map_sequential(chunks, function(chunk) {
Expand Down Expand Up @@ -141,6 +140,8 @@
# Returned block files for each fraction
block_files
})
# Remove NULL values from block files list
block_files <- Filter(function(x) !is.null(x), block_files)
# Merge blocks into a new eo_cube tile
band_tile <- .tile_eo_merge_blocks(
files = out_file,
Expand Down

0 comments on commit 3b52d8f

Please sign in to comment.