stac_find_pairs
Finds spatially overlapping satellite image pairs from two date ranges for change detection analysis, such as flood damage or urban growth.
Instructions
Find before/after scene pairs for change detection.
Searches two date ranges and matches scenes by spatial overlap, useful for detecting changes between time periods (e.g., flood damage, urban growth, deforestation, seasonal vegetation change).
Args: bbox: Bounding box [west, south, east, north] in EPSG:4326 before_range: Before date range "YYYY-MM-DD/YYYY-MM-DD" after_range: After date range "YYYY-MM-DD/YYYY-MM-DD" collection: STAC collection (default: sentinel-2-l2a). Options: sentinel-2-l2a, sentinel-2-c1-l2a, landsat-c2-l2, sentinel-1-grd, cop-dem-glo-30 max_cloud_cover: Maximum cloud cover percentage 0-100 (default: 20). Ignored for non-optical collections (sentinel-1-grd, cop-dem-glo-30). catalog: Catalog name (default: earth_search). Options: earth_search, planetary_computer, usgs output_mode: Response format - "json" (default) or "text"
Returns: JSON with matched scene pairs sorted by overlap percentage
Tips for LLMs: - Best for change detection workflows: find pairs, then download the same bands for before/after scenes and compare - For flood mapping: use sentinel-1-grd (SAR sees through clouds) with before_range = dry season, after_range = flood event - For vegetation change: use sentinel-2-l2a, then compute NDVI for each scene in the pair - Higher overlap_percent means better spatial coverage for comparison - Follow up with stac_download_bands or stac_compute_index on each scene in the pair
Example: pairs = await stac_find_pairs( bbox=[0.8, 51.8, 1.0, 51.95], before_range="2024-01-01/2024-03-31", after_range="2024-07-01/2024-09-30" )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | Yes | ||
| catalog | No | ||
| collection | No | ||
| after_range | Yes | ||
| output_mode | No | json | |
| before_range | Yes | ||
| max_cloud_cover | No |