if (FALSE) {
# Regeneration detection using RBR raster and default threshold (< 0)
process_otsu_regenera(
rbr_post = list(P2 = "data/RBR_1986.tif"),
output_dir = "output/regenera",
python_exe = "/usr/bin/python3",
gdal_polygonize_script = "/usr/bin/gdal_polygonize.py",
fire_year = 1984,
regen_year = c(2),
use_fixed_threshold = FALSE,
output_format = c("geojson")
)
# Same detection but using a fixed threshold of -150
process_otsu_regenera(
rbr_post = list(P2 = "data/RBR_1986.tif"),
output_dir = "output/regenera",
python_exe = "/usr/bin/python3",
gdal_polygonize_script = "/usr/bin/gdal_polygonize.py",
fire_year = 1984,
regen_year = c(2),
use_fixed_threshold = TRUE,
fixed_threshold_value = -150,
bind_all = FALSE,
n_rows = 2,
n_cols = 3,
tile_overlap = 1000,
tile = TRUE,
output_format = c("shp")
)
}
Run the code above in your browser using DataLab