0

我正在尝试使用平台提供的Google Earth Studio将 Google Earth Engine 图像导出到 Google 驱动器。导出图像的官方指南如下

// Load a landsat image and select three bands.
var landsat = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_123032_20140515')
  .select(['B4', 'B3', 'B2']);

// Create a geometry representing an export region.
var geometry = ee.Geometry.Rectangle([116.2621, 39.8412, 116.4849, 40.01236]);

// Export the image, specifying scale and region.
Export.image.toDrive({
  image: landsat,
  description: 'imageToDriveExample',
  scale: 30,
  region: geometry
});

上面的代码可以导出图像,但我需要导出特定坐标的图像,而不是

var landsat = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_123032_20140515')
      .select(['B4', 'B3', 'B2']);

我正在使用以下代码,

var landsat = ee.ImageCollection("LANDSAT/LT05/C01/T1_SR")
var point = ee.Geometry.Point([73.0479, 33.6844]);

代码成功执行,但是当我尝试运行任务以完成该过程时,出现以下错误,

映射函数的参数不能用于客户端操作

有人可以帮助我吗,我在这里做错了什么?谢谢

4

1 回答 1

1

夫妇的事情。首先,你想把你的观点放在哪里?因为现在它位于北冰洋。其次,当我执行你的代码时,它可以工作,但是当它在北极海导出一个 1x1 像素的陆地卫星图像时,它是空的。所以你必须在寻找别的东西。由于您的陆地卫星显示靠近北京的区域,我更改了 ee.Point 坐标以匹配。

您想在这一点上导出 landsat 值吗?然后试试这个:

// Load a landsat image and select three bands.
var landsat = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_123032_20140515')
  .select(['B4', 'B3', 'B2']);
  
Map.addLayer(landsat, {}, 'landsat image')

// Create a geometry representing an export region.
var geometry = ee.Geometry.Rectangle([116.2621, 39.8412, 116.4849, 40.01236]);
var point = ee.Geometry.Point([116.5632, 40.2404]);

var LandsatAtPoint = landsat.reduceRegions({
    collection: point, 
    reducer: ee.Reducer.mean(),
    scale: 30 // resolution of the bands is 30m
  })
print(LandsatAtPoint)

// Export the image, specifying scale and region.
Export.table.toDrive({
  collection: LandsatAtPoint,
  description: 'imageToDriveExample',
});

以表格格式导出图像的值而不是 1x1 像素图像更有意义。因此我Export.image.toDrive改为Export.table.toDrive

于 2021-08-17T08:12:08.120 回答