Skip to content

Commit

Permalink
adds a warning message, fixes #34
Browse files Browse the repository at this point in the history
  • Loading branch information
Nowosad committed Mar 9, 2024
1 parent a3114a0 commit 5fb3f7c
Show file tree
Hide file tree
Showing 2 changed files with 4 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: supercells
Title: Superpixels of Spatial Data
Version: 1.0.0
Version: 1.0.1
Authors@R: c(
person(given = "Jakub", family = "Nowosad",
role = c("aut", "cre"),
Expand Down
4 changes: 3 additions & 1 deletion R/supercells.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ supercells = function(x, k, compactness, dist_fun = "euclidean", avg_fun = "mean
# prepare minarea
if (missing(minarea)){
minarea = 0
} else if (minarea > step^2) {
warning("The provided minarea value is larger than than the average supercell (step^2). The connectivity cleaning is likely to fail.", call. = FALSE)
}
# disables cleaning if iter = 0
if (iter == 0){
Expand Down Expand Up @@ -232,7 +234,7 @@ optimize_chunk_size = function(dim_x, limit, by = 500){

# prepares the extents of chunks:
# if limit = FALSE, the extent of the whole input is returned
# if limit = TRUE, the extent of the input is split into chunks,
# if limit = TRUE, the extent of the input is split into chunks,
# where the size of each raster chunk is optimized to be as close to
# the (hardcoded) limit of 1GB as possible
# if limit is numeric, the extent of the input is split into chunks,
Expand Down

0 comments on commit 5fb3f7c

Please sign in to comment.