当前位置:
首页 > Python基础教程 >
-
用python下载gee影像
用python从GEE导出数据到Google drive
替换compute_wet_days函数,实现导出不同的加工数据
# 读取数据
name = "wdc1_era"
africa = ee.Geometry.Polygon(
[[[-24.64931493978714, 41.307415467346125],
[-24.64931493978714, -39.031243700520264],
[56.913185060213095, -39.031243700520264],
[56.913185060213095, 41.307415467346125]]]
)
years = ["2010", "2012", "2014", "2016", "2018", "2020", "2022"]
def compute_wet_days(precip_array):
threshold = ee.Image.constant(0.001) # 1mm 降水阈值
wet_days = precip_array.map(lambda img: img.gte(threshold))
wet_days_sum = wet_days.reduce(ee.Reducer.sum()).unmask(0, False).rename(name)
return wet_days_sum.toDouble()
for y in years:
start_date = ee.Date(y + "-1-1")
end_date = ee.Date(y + "-12-31")
rainfall_dataset = ee.ImageCollection("ECMWF/ERA5_LAND/DAILY_AGGR") #降雨单位是米
rainfall = rainfall_dataset.select(['total_precipitation_sum']).filterDate(start_date, end_date).filterBounds(africa)
wet_days_image = compute_wet_days(rainfall)
# 导出数据
ee.batch.Export.image.toDrive(
image=wet_days_image,
description=f"{name}_{y}",
folder=f"{name}",
scale=11000,
region=africa,
crs="EPSG:4326",
maxPixels=1e13
).start()
来源:https://www.cnblogs.com/geoli/p/18708056
栏目列表
最新更新
求1000阶乘的结果末尾有多少个0
详解MyBatis延迟加载是如何实现的
IDEA 控制台中文乱码4种解决方案
SpringBoot中版本兼容性处理的实现示例
Spring的IOC解决程序耦合的实现
详解Spring多数据源如何切换
Java报错:UnsupportedOperationException in Col
使用Spring Batch实现批处理任务的详细教程
java中怎么将多个音频文件拼接合成一个
SpringBoot整合ES多个精确值查询 terms功能实
SQL Server 中的数据类型隐式转换问题
SQL Server中T-SQL 数据类型转换详解
sqlserver 数据类型转换小实验
SQL Server数据类型转换方法
SQL Server 2017无法连接到服务器的问题解决
SQLServer地址搜索性能优化
Sql Server查询性能优化之不可小觑的书签查
SQL Server数据库的高性能优化经验总结
SQL SERVER性能优化综述(很好的总结,不要错
开启SQLSERVER数据库缓存依赖优化网站性能
uniapp/H5 获取手机桌面壁纸 (静态壁纸)
[前端] DNS解析与优化
为什么在js中需要添加addEventListener()?
JS模块化系统
js通过Object.defineProperty() 定义和控制对象
这是目前我见过最好的跨域解决方案!
减少回流与重绘
减少回流与重绘
如何使用KrpanoToolJS在浏览器切图
performance.now() 与 Date.now() 对比