GEE导出影像只有一列(一条线)的解决办法

问题描述:

我使用GEE想导出全球的SPEI指数,在设置范围的时候我尝试了两种方法:(1)不写研究区范围(2)研究区范围写成(-180,-90,180,90),这两种方法导出来的影像数据都只有1列(314*1)。
我尝试换了一个数据集,同样用了这两种办法,结果导出来的影像却是正常的。
这个问题与数据集有关系。如果遇到了这种情况,可以采取设置小一点的研究范围来解决。

详细解释:

(1)原始的代码:

// Retrieve the last date from the SPEI dataset.
var dataset = ee.ImageCollection("CSIC/SPEI/2_9").
  filterDate('2022-12-01', '2023-01-01');

// Select the 24-month analysis.
var spei24 = dataset.select('SPEI_24_month');

// Set the visualization ranges and color palette.
var visParams = {
  min: -2.33,
  max:  2.33,
  palette: [
    '8b1a1a', 'de2929', 'f3641d',
    'fdc404', '9afa94', '03f2fd',
    '12adf3', '1771de', '00008b',
  ]
};

// Set the map center to Spain's location.
Map.setCenter(-3.75, 40.47, 4);

// Display the SPEI 24-month layer.
Map.addLayer(spei24, visParams, 'SPEI 24 month');

// Define an area of interest
var geometry = ee.Geometry.Rectangle([-180, -90, 180, 90]);

// Export the image to Google Drive
Export.image.toDrive({
  image: spei24.mean(), // Exporting the mean of the 24-month SPEI
  description: 'SPEI_24_month_mean',
  folder: 'GEE_exports', // Change to your folder name in Google Drive
  region: geometry,
  scale: 50000, // Change according to your preference
  crs: 'EPSG:4326', // Change according to your preference
  maxPixels: 1e13 // Adjust as per your requirement
});

原始导出结果:
在这里插入图片描述
(2)修改:

// Define an area of interest
var geometry = ee.Geometry.Rectangle([0, -90, 180, 90]);

结果:
在这里插入图片描述
我把这个影像分成两半来下载就会好很多。

  • 7
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值