# NOT RUN {
# get patches for class 1 from testdata as raster
class_1 <- get_patches(landscape, class = 1)[[1]]
# calculate the minimum circumscribing circle of each patch in class 1
get_circumscribingcircle(class_1)
# do the same with a 3 column matrix (x, y, id)
class_1_matrix <- raster::rasterToPoints(class_1)
get_circumscribingcircle(class_1_matrix, resolution_x = 1, resolution_y = 1)
# }
Run the code above in your browser using DataLab