利用Python从EarthExplorer上自动化批量下载Landsat系列数据

下载方法基于Landsatxplore工具包,链接https://github.com/yannforget/landsatxplore

1 数据支持

在这里插入图片描述

2 使用方法

landsatxplore支持命令行运行(https://github.com/yannforget/landsatxplore),也可以在解释器中根据需求使用。这里只分享批量量化搜索和下载方法。

2.1 Image搜索与下载

图像搜索可以根据经纬度和起止日期进行检索,同时支持设置云覆盖率。可以根据自己的需求设置dataset的类型。

from landsatxplore.api import API
# 搜索Landsat 8数据
        scenes = api.search(
            dataset='landsat_ot_c2_l1',
            latitude=latitude,
            longitude=longitude,
            start_date=date,
            end_date=date,
            max_cloud_cover=80
        )

搜索到结果后会返回检索到的信息,使用EarthExplorer.download函数进行下载:

from landsatxplore.earthexplorer import EarthExplorer
ee = EarthExplorer(username, password)
for scene in scenes:
	ee.download(scene['entity_id'], output_dir=output_dir)

2.2 自动批量下载landsat数据

完整代码

import pandas as pd
from landsatxplore.api import API
from landsatxplore.earthexplorer import EarthExplorer
import os
import json
from datetime import datetime
from shapely
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值