Back to skills
extension
Category: Data & AnalyticsNo API key required

Sentinel Downloader

Download Sentinel-1, Sentinel-2, and Sentinel-5P imagery through STAC search and batch download. Use for Sentinel image search by bounding box/date/cloud cov...

personAuthor: ruiduobaohubclawhub

Sentinel Downloader | 哨兵卫星影像下载器

用 STAC API 搜索并下载 Sentinel-1、Sentinel-2 和 Sentinel-5P 影像。脚本只依赖 requests

依赖

pip install 'requests>=2.28.0'

在 Bash 中可运行 ./sentinel-download.sh --check-deps 自动检查并安装依赖;Windows 用户直接用 Python 执行 sentinel-download.py

使用方法

所有检索命令都必须包含 --bbox--start-date--end-date

搜索 Sentinel-2 影像

./sentinel-download.sh --bbox 116.0 39.0 117.0 40.0 --start-date 2024-01-01 --end-date 2024-12-31

搜索并限制云量

./sentinel-download.sh --bbox 116.0 39.0 117.0 40.0 --start-date 2024-01-01 --end-date 2024-12-31 --max-cloud-cover 10

搜索并下载

./sentinel-download.sh --bbox 116.0 39.0 117.0 40.0 --download --output-dir ./data

常用选项

  • --mission sentinel-1|sentinel-2|sentinel-5p:选择任务,默认 Sentinel-2。
  • --max-cloud-cover 10:限制 Sentinel-2 云量百分比。
  • --limit 5:先小范围试检索,避免一次下载过多数据。
  • --output-format json:以 JSON 输出检索结果。
  • --no-progress:在日志或自动化环境关闭动态进度显示。
  • --download-timeout 600:为网络较慢的大文件调整单个请求超时秒数。

下载进度与文件保护

  • 已知文件大小时显示进度条、百分比、已下载/总大小、瞬时速度和预计剩余时间。
  • 服务端未提供文件大小时显示动态下载状态、已下载大小和速度。
  • 下载过程写入同目录的 .part 临时文件;仅成功完成后才替换为最终文件。失败会清除临时文件,不会覆盖已有的最终文件。

支持的卫星任务

| 任务 | 说明 | 数据类型 | | Sentinel-1 | SAR Radar Imagery / SAR 雷达影像 | All-weather monitoring / 全天候地表监测 | | Sentinel-2 | Multispectral Optical / 多光谱光学影像 | Land observation, 10m resolution / 陆地观测,10m 分辨率 | | Sentinel-5P | Atmospheric Monitoring / 大气成分监测 | Air quality, ozone / 空气质量、臭氧等 |


参数说明

| 参数 | 说明 | 必填 | | --bbox | Geographic extent [minLon minLat maxLon maxLat] / 地理范围 | Yes / 是 | | --start-date | Start date YYYY-MM-DD / 开始日期 | Yes / 是 | | --end-date | End date YYYY-MM-DD / 结束日期 | Yes / 是 | | --mission | Satellite mission (sentinel-1/2/5p) / 卫星任务 | No / 否 | | --max-cloud-cover | Max cloud cover percentage / 最大云量百分比 | No / 否 | | --download | Download imagery / 是否下载 | No / 否 |

运行 python sentinel-download.py --help 查看完整参数,python sentinel-download.py --version 查看当前版本。


输出示例

正在搜索 sentinel-2 影像...
  找到 3 个结果

[1] S2A_MSIL2A_20241227T031141_R075_T50TNK
    时间:2024-12-27
    云量:0.4%
    平台:Sentinel-2A

STAC API 端点

| Name | URL | |------|-----| | Microsoft Planetary Computer | https://planetarycomputer.microsoft.com/api/stac/v1 | | AWS Earth Search | https://earth-search.aws.element84.com/v1 |


许可证

MIT-0 - Free to use, modify, and redistribute. No attribution required.