Ir al contenido

Loads and validates a user-provided LULC GeoTIFF or Cloud-Optimized GeoTIFF (COG) file. Ensures the data is properly formatted and optionally validates coverage against a boundary layer.

Uso

load_local_lulc_data(local_file, boundary_layer = NULL)

Argumentos

local_file

Character. Path to the local GeoTIFF or COG file.

boundary_layer

An sf object for extent validation (optional but recommended).

Valor

A SpatRaster object with attribute lulc_product = "local".

Detalles

When using a local LULC file, you must provide your own class mappings to consumer functions (e.g., make_manage_zone(), make_protect_zone()) via the agriculture_lulc_value, built_area_lulc_value, and similar parameters.

Ejemplos

if (FALSE) { # \dontrun{
# Load a local LULC file
local_lulc <- load_local_lulc_data(
  local_file = "path/to/my_lulc.tif",
  boundary_layer = ghana_boundary
)

# Use with custom class mappings
manage_zone <- make_manage_zone(
  lulc_raster = local_lulc,
  lulc_product = "local",
  agriculture_lulc_value = 12,
  built_area_lulc_value = 15,
  ...
)
} # }