Skip to content

Commit

Permalink
Merge branch 'feat/dev-sits' of https://github.com/OldLipe/sits into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
M3nin0 committed Jun 14, 2024
2 parents 423352c + d291650 commit 524e38c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/sits_segmentation.R
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ sits_slic <- function(data = NULL,
# Get valid centers
valid_centers <- slic[[2]][, 1] != 0 | slic[[2]][, 2] != 0
# Bind valid centers with segments table
v_obj <- cbind(v_obj, stats::na.omit(slic[[2]][valid_centers, ]))
v_obj <- cbind(
v_obj, matrix(stats::na.omit(slic[[2]][valid_centers, ]), ncol = 2)
)
# Rename columns
names(v_obj) <- c("supercells", "x", "y", "geometry")
# Get the extent of template raster
Expand Down

0 comments on commit 524e38c

Please sign in to comment.