# import raster image
data(normforest)
normforest <- terra::unwrap(normforest)
# locate the flattest 40% of the bearing area curve
line_data <- find_flat(normforest, perc = 0.4)
# extract the equation of the line
bf_line <- line_data[[1]]
Run the code above in your browser using DataLab