Skip to content

Commit

Permalink
improves lsp_add_terra
Browse files Browse the repository at this point in the history
  • Loading branch information
Nowosad committed Apr 21, 2023
1 parent f928e72 commit 60a6c44
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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"),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/lsp_add_spatial.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 60a6c44

Please sign in to comment.