Skip to content

Commit

Permalink
Minor cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mhesselbarth committed Jun 25, 2024
1 parent b255026 commit 1268c15
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# landscapemetrics 2.1.3
* Bugfixes
* Fixed bug in `get_centroids()` related to the patch id
* Various
* Improve documentation
* Improve labels of `show_patches()`

# landscapemetrics 2.1.2
* Bugfixes
Expand Down
23 changes: 10 additions & 13 deletions R/get_circumscribingcircle.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,16 @@ get_circumscribingcircle_calc <- function(landscape, level, directions) {
classes <- get_unique_values_int(landscape, verbose = FALSE)

# loop all classes
circle <- do.call(rbind,
lapply(classes, function(patches_class) {
# get patches
landscape_labeled <- get_patches_int(landscape,
class = patches_class,
directions = directions)[[1]]

# get circle
cbind(class = as.integer(patches_class),
rcpp_get_circle(landscape_labeled,
resolution_xy = resolution[1]))
})
)
circle <- do.call(rbind, lapply(classes, function(patches_class) {

# get patches
landscape_labeled <- get_patches_int(landscape, class = patches_class,
directions = directions)[[1]]

# get circle
cbind(class = as.integer(patches_class), rcpp_get_circle(landscape_labeled,
resolution_xy = resolution[1]))
}))

# resulting tibble
circle <- tibble::new_tibble(list(level = rep("patch", nrow(circle)),
Expand Down

0 comments on commit 1268c15

Please sign in to comment.