Skip to content

Commit

Permalink
support fot FLT4S and new version of supercells
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbertocamara committed Feb 16, 2024
1 parent bb3ac51 commit 7a8bb49
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Imports:
parallel (>= 4.0.5),
purrr (>= 1.0.2),
Rcpp,
rstac (>= 0.9.2-5),
rstac (>= 1.0.0),
sf (>= 1.0-12),
showtext,
sysfonts,
Expand All @@ -66,6 +66,7 @@ Imports:
Suggests:
caret,
cli,
covr,
dendextend,
dtwclust,
DiagrammeR,
Expand Down Expand Up @@ -94,12 +95,11 @@ Suggests:
spdep,
stars (>= 0.6),
stringr,
supercells,
supercells (>= 1.0.0),
testthat (>= 3.1.3),
tmap (>= 3.3),
torchopt (>= 0.1.2),
xgboost,
covr
xgboost
Config/testthat/edition: 3
Config/testthat/parallel: false
Config/testthat/start-first: cube, raster, regularize, data, ml
Expand Down
8 changes: 4 additions & 4 deletions R/sits_segmentation.R
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,10 @@ sits_slic <- function(data = NULL,
inherits = FALSE
)
slic <- fn(
mat = mat, vals = data, step = step, nc = compactness,
con = TRUE, centers = TRUE, type = dist_fun,
type_fun = function() "", avg_fun_fun = function() "",
avg_fun_name = avg_fun, iter = iter, lims = minarea,
mat = mat, vals = data, step = step, compactness = compactness,
clean = TRUE, centers = TRUE, dist_name = dist_fun,
dist_fun = function() "", avg_fun_fun = function() "",
avg_fun_name = avg_fun, iter = iter, minarea = minarea,
input_centers = matrix(c(0L, 0L), ncol = 2),
verbose = as.integer(verbose)
)
Expand Down
8 changes: 4 additions & 4 deletions inst/extdata/config_internals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ default_values :
scale_factor : 0.0001

FLT4S :
data_type : "INT4S"
missing_value: -Inf
minimum_value: -Inf
maximum_value: Inf
data_type : "FLT4S"
missing_value: -3.402823466385288e+37
minimum_value: -3.402823466385288e+37
maximum_value: 1.7014118346015974e+37
offset_value : 0
scale_factor : 1

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-apply.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ test_that("Testing non-normalized index generation", {
gc_cube_new <- sits_apply(cube,
XYZ = 1 / NDVI * 0.25,
normalized = FALSE,
multicores = 2,
multicores = 1,
output_dir = dir_images
)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-cube.R
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ test_that("Creating cubes from BDC - LANDSAT per tile", {
testthat::skip_if(purrr::is_null(bdc_l8_cube),
message = "BDC cube LANDSAT-OLI-16D is not accessible"
)
usexpect_equal(bdc_l8_cube$tile, tile)
expect_equal(bdc_l8_cube$tile, tile)
expect_true(all(sits_bands(bdc_l8_cube) %in% bands))
# test timeline
timeline <- sits_timeline(bdc_l8_cube)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-segmentation.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test_that("Segmentation", {
segments <- sits_segment(
cube = cube,
output_dir = tempdir(),
multicores = 6,
multicores = 1,
memsize = 24
)
expect_s3_class(object = segments, class = "vector_cube")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-view.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test_that("View", {
v3 <- sits_view(modis_label)
expect_true(grepl("EPSG3857", v3$x$options$crs$crsClass))
expect_true(
all(v3$x$calls[[6]]$args[[1]]$labels %in% c(
all(v3$x$calls[[7]]$args[[1]]$labels %in% c(
"Cerrado", "Pasture",
"Forest", "Soy_Corn"
))
Expand Down

0 comments on commit 7a8bb49

Please sign in to comment.