stac_mosaic
Combines overlapping satellite scenes into a single seamless raster. Ideal when your area of interest covers multiple tiles.
Instructions
Create a mosaic from multiple scenes.
Combines overlapping scenes into a single seamless raster. Useful when your area of interest spans multiple satellite tiles.
Args: scene_ids: List of scene identifiers to mosaic (from stac_search) bands: Bands to include (e.g., ["red", "green", "blue"]) bbox: Output bounding box [west, south, east, north] in EPSG:4326. Defaults to union of all scenes if not specified output_format: "geotiff" (default, lossless) or "png" (8-bit preview) cloud_mask: Apply SCL-based cloud masking per scene before merge (Sentinel-2 only) method: Merge method: - "last" (default): later scenes overwrite earlier in overlap areas - "quality": SCL-based best-pixel selection — picks the clearest pixel from overlapping scenes (Sentinel-2 only) output_mode: Response format - "json" (default) or "text"
Returns: JSON with artifact_ref for the mosaic raster
Tips for LLMs: - Use stac_coverage_check first to verify scenes cover the target area - Use method="quality" for cloud-free mosaics from Sentinel-2 data - Use method="last" for quick mosaics or non-optical data - For temporal compositing (e.g., seasonal median), use stac_temporal_composite instead
Example: mosaic = await stac_mosaic( scene_ids=["S2B_001", "S2B_002"], bands=["red", "green", "blue"], method="quality" )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | No | ||
| bands | Yes | ||
| method | No | last | |
| scene_ids | Yes | ||
| cloud_mask | No | ||
| output_mode | No | json | |
| output_format | No | geotiff |