Download the ESRI 10m Land Use/Land Cover Time Series (LULC) Layer
download_esri_lulc_data.RdRetrieves the ESRI Global LULC Time Series at 10m resolution from Earth Engine. Downloads the most recent year available and returns the result as a local Cloud-Optimized GeoTIFF with appropriate layer naming.
Uso
download_esri_lulc_data(
boundary_layer,
iso3,
gee_project,
output_dir = here::here(),
pus = NULL,
aggregate_to_pus = FALSE,
wait_time = 5,
...
)Argumentos
- boundary_layer
An
sfobject defining the spatial boundary of interest.- iso3
Character. Three-letter ISO country code for filename generation.
- gee_project
Character. Google Earth Engine cloud project ID. This is required and must be a valid GEE project you have access to. Find your project ID in the GEE Code Editor.
- output_dir
Character. Local output directory. Defaults to project root via
here::here()- pus
SpatRaster or NULL. Planning units raster for GEE-side aggregation. When provided with
aggregate_to_pus = TRUE, the export will be resampled to match the PU resolution and projection in GEE before download.- aggregate_to_pus
Logical. If TRUE and
pusis provided, aggregate the data to planning unit resolution in GEE before export. This significantly speeds up processing by eliminating local resampling. Default is FALSE.- wait_time
Numeric. Maximum time in minutes to wait for the GEE export to appear in Google Drive. Default is 5. Increase for large exports.
- ...
Additional arguments passed to
download_gee_layer().
Exemplos
if (FALSE) { # \dontrun{
# Download LULC data for Ghana
lulc <- download_esri_lulc_data(
boundary_layer = ghana_boundary,
iso3 = "GHA",
gee_project = "my-gee-project"
)
# Download with GEE-side aggregation to planning units
lulc_agg <- download_esri_lulc_data(
boundary_layer = ghana_boundary,
iso3 = "GHA",
gee_project = "my-gee-project",
pus = planning_units,
aggregate_to_pus = TRUE
)
} # }