Passer au contenu

This function creates a SpatRaster layer representing planning units where urban greening interventions are applicable in the ELSA framework. The Urban Greening Zone identifies built/urban areas where greening actions (e.g., tree planting, green infrastructure) can be implemented.

Utilisation

make_urban_greening_zone(
  iso3,
  pus,
  built_areas_input = NULL,
  lulc_proportions = NULL,
  lulc_raster = NULL,
  lulc_product = c("esri_10m", "dynamic_world", "esa_worldcover", "local"),
  built_area_lulc_value = NULL,
  built_area_threshold = 0,
  filter_patch_size = FALSE,
  min_patch_size = 10,
  output_path = NULL
)

Arguments

iso3

ISO3 country code (e.g., "NPL").

pus

A SpatRaster defining the planning units.

built_areas_input

A SpatRaster representing binary or probabilistic built-up areas (optional). If provided, this takes priority over extraction from other inputs.

lulc_proportions

A multi-band SpatRaster or list from download_lulc_proportions() containing pre-computed class proportions. If provided and contains "built_area", will be used if built_areas_input is NULL.

lulc_raster

A SpatRaster LULC map used to extract built-up areas if not already provided (default: NULL).

lulc_product

Character. LULC product used for class value lookups: "esri_10m" (default), "dynamic_world", "esa_worldcover", or "local". When "local", built_area_lulc_value must be provided.

built_area_lulc_value

Integer or NULL. LULC value representing built-up areas. If NULL, automatically determined from lulc_product. Default is NULL.

built_area_threshold

Minimum fraction for built-up area to be included (default: 0). A threshold of 0 includes all urban areas, which is recommended since urban areas are often small and should be preserved.

filter_patch_size

Logical. Whether to remove small isolated patches (default: FALSE). Defaults to FALSE because urban areas are often small and should be preserved.

min_patch_size

Integer. Minimum patch size to retain (in raster cells; default: 10). Only used if filter_patch_size = TRUE.

output_path

Optional directory to write the result as a COG.

Valeur de retour

A SpatRaster with values 1 (urban greening zone) and 0 (not urban).

Détails

This zone is simpler than Protect, Restore, or Manage zones as it has a single primary input (built/urban areas). It essentially transforms the built area raster into a formal zone layer for consistency with the ELSA framework.

Exemples

if (FALSE) { # \dontrun{
urban_greening_zone <- make_urban_greening_zone(
  pus = planning_units,
  iso3 = "NPL",
  built_areas_input = built_raster,
  output_path = "outputs/"
)
} # }