Create sf object of forest with minimal altitude and percentage of forest

create_sf_forest(
  EPSG = 3163,
  altitude_min = 0,
  percentage_min = 50,
  elevation,
  forest
)

Arguments

EPSG

int. target EPSG, default 3163

altitude_min

float. minimal altitude to consider forest, default 0

percentage_min

int. percentage minimal of forest to consider pixels as forest, default 50

elevation

terra object. output of "rast" of "terra" library with elevation in meters

forest

terra object. output of "rast" of "terra" library with percentage of forest

Value

sf object. with only forest higher than `altitude_min` & `percentage_min`