python导入哨兵数据_科学网—【Python】批量下载Sentinel-2卫星数据 - 江佳乐的博文...

简介:本文介绍了一种基于Python批量下载Sentinel-2卫星数据的方法。通过该方法,用户可自定义感兴趣研究区(ROI)、限定时间范围、选择产品类别、进行云量筛选,实现自动化批量下载Sentinel-2卫星数据。

Requirements:

Useful link:

Installation:pip install sentinelsat

Usage:

Step 1. Set up

from sentinelsat.sentinel import SentinelAPI, read_geojson, geojson_to_wkt

from collections import OrderedDict# Connect to the API (edit your user_name and password)

api = SentinelAPI('USER_NAME', 'PASSWORD', 'https://scihub.copernicus.eu/dhus')# Search by polygon, time, producttype and cloud cover

roi = 'POLYGON((DEFINE ROI))' # define your ROI from http://geojson.io/#map=2/20.0/0.0

start_date = 'YYYYMMDD'

end_date = 'YYYYMMDD'

product_type = 'S2MSI2A' # check product type: https://scihub.copernicus.eu/dhus/#/home

cloud_cover = [MIN,MAX] # percentage

Define ROI

Step 2. Search and check resultsproducts = api.query(area=roi,date=(start_date, end_date),

producttype=product_type,cloudcoverpercentage=cloud_cover)

downfiles = OrderedDict()

for i in products:

product = products[i]

filename = product['filename']

print(filename)

Step 3. Data download# Download all results from the search

successfile = api.download_all(products)

Example:

Reference:

转载本文请联系原作者获取授权,同时请注明本文来自江佳乐科学网博客。

链接地址:http://blog.sciencenet.cn/blog-3425264-1212209.html

上一篇:【Python】基于Python API批量下载Planet卫星数据

下一篇:如何查询SCI期刊JCR分区(附:2019年遥感类SCI期刊中科院和JCR分区情况)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值