diff --git a/DESCRIPTION b/DESCRIPTION index 43518f5..8de8960 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: motif Title: Local Pattern Analysis -Version: 0.6.1 +Version: 0.6.2 Authors@R: c( person(given = "Jakub", family = "Nowosad", role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index cf4fce6..eb109b2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# motif 0.6.2 + +* Improves handling of terra's `SpatRaster` class in `lsp_add_terra` + # motif 0.6.1 * `lsp_add_stars` and `lsp_add_terra` now do not drop the `signature` list-column, but restructures it into many raster layers diff --git a/R/lsp_add_spatial.R b/R/lsp_add_spatial.R index a837985..4553883 100644 --- a/R/lsp_add_spatial.R +++ b/R/lsp_add_spatial.R @@ -203,7 +203,7 @@ lsp_add_terra = function(x = NULL, window = NULL){ if (!requireNamespace("terra", quietly = TRUE)){ stop("package terra required, please install it first") # nocov } - output = lsp_add_stars(x = x, window = window) + output = lsp_add_stars(x = stars::st_as_stars(x), window = window) output_names = names(output) output = terra::rast(output) names(output) = output_names