Skip to content

Commit

Permalink
Fix missing hulls when concave polygons are not generated for groups (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
yoda-vid authored Jan 16, 2024
1 parent 82f7b73 commit 9bebf4f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/mark_hull.R
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ makeContent.hull_enc <- function(x) {
}
concaveman::concaveman(mat, x$concavity, 0)
}, xx = x_new, yy = y_new)
# ensure that all polygons have the same set of column names
polygons <- lapply(polygons, function(x) {
colnames(x) <- c("x", "y")
return(x)}
)
mark$id <- rep(seq_along(polygons), vapply(polygons, nrow, numeric(1)))
polygons <- vec_rbind(!!!polygons)
mark$x <- unit(polygons[, 1], 'mm')
Expand Down

0 comments on commit 9bebf4f

Please sign in to comment.