flsgen_extract_structure_from_raster: Extracts a landscape structure from an existing raster

View source: R/flsgen_extract_structure_from_raster.R

flsgen_extract_structure_from_rasterR Documentation

Extracts a landscape structure from an existing raster

Description

Extracts a landscape structure from an existing raster

Usage

flsgen_extract_structure_from_raster(
  raster_file,
  focal_classes,
  connectivity = 4
)

Arguments

raster_file

terra::rast object or path of the raster

focal_classes

vector of integers representing the raster values of the focal classes to extract the structure from

connectivity

Connectivity definition in the regular square grid (4 or 8)."

Value

A JSON landscape structure that can be used with flsgen generate

Examples

  ## Not run: 
    ls_struct <- flsgen_extract_structure_from_raster(raster_path, c(0, 1, 2))
  
## End(Not run)


dimitri-justeau/rflsgen documentation built on May 31, 2024, 8:15 a.m.