stac_temporal_composite
Create cloud-free composites by statistically combining multiple satellite scenes over a date range. Supports median, mean, max, and min methods.
Instructions
Create a temporal composite by combining multiple scenes statistically.
Searches for scenes in the date range, downloads bands from each, then combines them pixel-by-pixel using a statistical method. Useful for creating cloud-free composites from cloudy time series.
Args: bbox: Area of interest [west, south, east, north] in EPSG:4326 bands: Bands to composite (e.g., ["red", "green", "blue"]) date_range: Date range "YYYY-MM-DD/YYYY-MM-DD" method: Statistical method - "median" (default), "mean", "max", "min" collection: STAC collection (default: sentinel-2-l2a) max_cloud_cover: Maximum cloud cover 0-100 (default: 20) max_items: Maximum scenes (default: 10) catalog: Catalog name (default: earth_search) cloud_mask: Apply SCL cloud masking per scene before compositing output_format: Output format - "geotiff" (default) or "png" output_mode: Response format - "json" (default) or "text"
Returns: JSON with artifact_ref for the temporal composite
Tips for LLMs: - Method selection: - "median" (default): best for cloud-free composites — robust to outliers from clouds/shadows - "mean": smooth average, good for general baselines - "max": captures peak values (e.g., peak NDVI in a growing season) - "min": captures minimum values (e.g., lowest water extent) - Enable cloud_mask=True with Sentinel-2 for best results — masks clouds before compositing so they don't affect the statistics - Use a 2-3 month date range for seasonal composites - For per-date outputs instead of a single composite, use stac_time_series - Cloud cover filter is automatically skipped for non-optical collections (sentinel-1-grd, cop-dem-glo-30) - max_items defaults to 10 — increase for denser temporal sampling
Example: composite = await stac_temporal_composite( bbox=[0.85, 51.85, 0.95, 51.92], bands=["red", "green", "blue"], date_range="2024-06-01/2024-08-31", method="median" )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | Yes | ||
| bands | Yes | ||
| method | No | median | |
| catalog | No | ||
| max_items | No | ||
| cloud_mask | No | ||
| collection | No | ||
| date_range | Yes | ||
| output_mode | No | json | |
| output_format | No | geotiff | |
| max_cloud_cover | No |