From 9bf57bccba38818d406725ba413128c0be44ec7b Mon Sep 17 00:00:00 2001 From: be-marc Date: Fri, 12 Sep 2025 11:42:55 +0200 Subject: [PATCH 1/6] release: 0.6.1 --- DESCRIPTION | 2 +- NEWS.md | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 01565ca..a04390b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: mlr3spatial Title: Support for Spatial Objects Within the 'mlr3' Ecosystem -Version: 0.6.0.9000 +Version: 0.6.1 Date: 2025-07-18 Authors@R: c( diff --git a/NEWS.md b/NEWS.md index aec7e2b..fe9c5d1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,6 @@ -# mlr3spatial (development version) +# mlr3spatial 0.6.1 + +* compatibility: mlr3 1.2.0 removed the data format argument # mlr3spatial 0.6.0 From f406385a1ffc9bf1f7fc6f49a0c5cb1ea7c70121 Mon Sep 17 00:00:00 2001 From: be-marc Date: Fri, 12 Sep 2025 12:10:30 +0200 Subject: [PATCH 2/6] ... --- man/TaskClassifST.Rd | 1 + man/TaskRegrST.Rd | 1 + man/mlr3spatial-package.Rd | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/man/TaskClassifST.Rd b/man/TaskClassifST.Rd index 16867aa..1b76df9 100644 --- a/man/TaskClassifST.Rd +++ b/man/TaskClassifST.Rd @@ -51,6 +51,7 @@ If \code{TRUE}, coordinates are used as features.}
  • mlr3::Task$head()
  • mlr3::Task$help()
  • mlr3::Task$levels()
  • +
  • mlr3::Task$materialize_view()
  • mlr3::Task$missings()
  • mlr3::Task$rbind()
  • mlr3::Task$rename()
  • diff --git a/man/TaskRegrST.Rd b/man/TaskRegrST.Rd index 207ff3e..b4ca1ff 100644 --- a/man/TaskRegrST.Rd +++ b/man/TaskRegrST.Rd @@ -52,6 +52,7 @@ If \code{TRUE}, coordinates are used as features.}
  • mlr3::Task$head()
  • mlr3::Task$help()
  • mlr3::Task$levels()
  • +
  • mlr3::Task$materialize_view()
  • mlr3::Task$missings()
  • mlr3::Task$rbind()
  • mlr3::Task$rename()
  • diff --git a/man/mlr3spatial-package.Rd b/man/mlr3spatial-package.Rd index 05ee881..3e04da4 100644 --- a/man/mlr3spatial-package.Rd +++ b/man/mlr3spatial-package.Rd @@ -66,7 +66,7 @@ likely be removed in a future version of the package. analysis. \references{ Becker M, Schratz P (2025). \emph{mlr3spatial: Support for Spatial Objects Within the 'mlr3' Ecosystem}. -R package version 0.6.0.9000, \url{https://mlr3spatial.mlr-org.com}. +R package version 0.6.1, \url{https://mlr3spatial.mlr-org.com}. } \seealso{ Useful links: From 151641b21505bb441eb12a4b087e28b20f430189 Mon Sep 17 00:00:00 2001 From: be-marc Date: Fri, 12 Sep 2025 14:41:58 +0200 Subject: [PATCH 3/6] ... --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index fe9c5d1..3f0240e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ # mlr3spatial 0.6.1 * compatibility: mlr3 1.2.0 removed the data format argument +* fix: `$predict_newdata()` and `predict_spatial()` work without optional column roles like `coordinate` now. # mlr3spatial 0.6.0 From e4dcb04214516a7af68f5370d80e2e8a0dbb960c Mon Sep 17 00:00:00 2001 From: be-marc Date: Sun, 14 Sep 2025 08:16:05 +0200 Subject: [PATCH 4/6] ... --- DESCRIPTION | 2 +- R/data.R | 3 +++ tests/testthat/test_DataBackendRaster.R | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9b1e1e1..bf90df1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -17,7 +17,7 @@ URL: https://mlr3spatial.mlr-org.com, https://github.com/mlr-org/mlr3spatial BugReports: https://github.com/mlr-org/mlr3spatial/issues Depends: - mlr3 (>= 1.1.0), + mlr3 (>= 1.2.0), R (>= 3.1.0) Imports: checkmate (>= 2.0.0), diff --git a/R/data.R b/R/data.R index f433035..2d8354a 100644 --- a/R/data.R +++ b/R/data.R @@ -98,6 +98,7 @@ generate_stack = function(layers, layer_size = NULL, dimension = NULL, multi_lay if (layer$type == "numeric") { data = matrix(c(stats::rnorm(floor(dimension^2 / 2), 0, 1), stats::rnorm(ceiling(dimension^2 / 2), 1, 1)), nrow = dimension) ras = rast(data) + terra::crs(ras) = "EPSG:4326" if (!layer$in_memory && !multi_layer_file) { filename = tempfile(fileext = ".tif") writeRaster(ras, filename) @@ -107,6 +108,7 @@ generate_stack = function(layers, layer_size = NULL, dimension = NULL, multi_lay } else if (layer$type == "factor") { data = matrix(rep(seq_along(layer$levels), each = floor(dimension^2 / length(layer$levels)), length.out = dimension^2), nrow = dimension) ras = rast(data) + terra::crs(ras) = "EPSG:4326" ras = terra::categories(ras, layer = 1, data.table(ID = seq_along(layer$levels), category = layer$levels)) if (!layer$in_memory && !multi_layer_file) { filename = tempfile(fileext = ".tif") @@ -117,6 +119,7 @@ generate_stack = function(layers, layer_size = NULL, dimension = NULL, multi_lay } else if (layer$type == "weights") { data = matrix(runif(dimension^2, 0, 1), nrow = dimension) ras = rast(data) + terra::crs(ras) = "EPSG:4326" if (!layer$in_memory && !multi_layer_file) { filename = tempfile(fileext = ".tif") writeRaster(ras, filename) diff --git a/tests/testthat/test_DataBackendRaster.R b/tests/testthat/test_DataBackendRaster.R index ca151b0..3913a65 100644 --- a/tests/testthat/test_DataBackendRaster.R +++ b/tests/testthat/test_DataBackendRaster.R @@ -273,7 +273,7 @@ test_that("data prototyp works", { ) backend = DataBackendRaster$new(stack) - expect_data_table(backend$data(rows = integer(0), cols = c("x_1", "y")), nrows = 0, ncols = 2) + suppressWarnings(expect_data_table(backend$data(rows = integer(0), cols = c("x_1", "y")), nrows = 0, ncols = 2)) }) test_that("in memory rasters work", { From 73d95b52222abc5aa6e9fb041c6bc748f48eafb4 Mon Sep 17 00:00:00 2001 From: be-marc Date: Sun, 14 Sep 2025 12:24:44 +0200 Subject: [PATCH 5/6] ... --- DESCRIPTION | 2 -- NAMESPACE | 1 + R/zzz.R | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index bf90df1..68e1a23 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -42,8 +42,6 @@ Suggests: rpart, stars (>= 0.5-5), testthat (>= 3.0.0) -Remotes: - mlr-org/mlr3 VignetteBuilder: knitr Config/testthat/edition: 3 diff --git a/NAMESPACE b/NAMESPACE index a711d40..f607705 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -59,6 +59,7 @@ importFrom(R6,R6Class) importFrom(R6,is.R6) importFrom(methods,as) importFrom(stats,complete.cases) +importFrom(stats,runif) importFrom(terra,cats) importFrom(terra,head) importFrom(terra,intersect) diff --git a/R/zzz.R b/R/zzz.R index a4d76be..2550a31 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -4,7 +4,7 @@ #' @import mlr3 #' @import sf #' @importFrom R6 R6Class is.R6 -#' @importFrom stats complete.cases +#' @importFrom stats complete.cases runif #' @importFrom utils getFromNamespace data #' #' @section Learn mlr3: From 9f99a4f20d69f5c499aa6e1ea14ddfac28b377ed Mon Sep 17 00:00:00 2001 From: be-marc Date: Sun, 14 Sep 2025 13:11:06 +0200 Subject: [PATCH 6/6] ... --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 68e1a23..521cf4b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: mlr3spatial Title: Support for Spatial Objects Within the 'mlr3' Ecosystem Version: 0.6.1 -Date: 2025-07-18 +Date: 2025-09-14 Authors@R: c( person("Marc", "Becker", , "marcbecker@posteo.de", role = c("aut", "cre"),