powered by
Extracts a landscape structure from an existing raster
flsgen_extract_structure_from_raster( raster_file, focal_classes, connectivity = 4 )
A JSON landscape structure that can be used with flsgen generate
terra::rast object or path of the raster
vector of integers representing the raster values of the focal classes to extract the structure from
Connectivity definition in the regular square grid (4 or 8)."
if (FALSE) { ls_struct <- flsgen_extract_structure_from_raster(raster_path, c(0, 1, 2)) }
Run the code above in your browser using DataLab