local_chunk_extract: Extract Statistics Locally for a Single Geometry Chunk

View source: R/run_geelite.R

local_chunk_extractR Documentation

Extract Statistics Locally for a Single Geometry Chunk

Description

Computes statistical summaries for a given spatial feature (sf_chunk) from an Earth Engine ee$ImageCollection over a specified date range. This function extracts values for a specific band and applies a chosen reducer.

Usage

local_chunk_extract(sf_chunk, imgs, dates, band, stat, stat_fun, scale)

Arguments

sf_chunk

[mandatory] (sf) An sf data frame containing geometry.

imgs

[mandatory] (ee$ImageCollection) The Earth Engine image collection to extract statistics from.

dates

[mandatory] (character) A vector of date strings corresponding to images in the collection.

band

[mandatory] (character) The name of the band to extract.

stat

[mandatory] (character) The statistical function to apply (e.g., "mean").

stat_fun

[mandatory] (ee$Reducer) The Earth Engine reducer function.

scale

[mandatory] (numeric) The spatial resolution in meters for reduce operations.

Value

(data.frame) A data frame containing extracted statistics with columns id, band, zonal_stat, and date-based values.


geeLite documentation built on Aug. 9, 2025, 1:08 a.m.