1

I'm searching how to export an image from earth engine to the drive. But I would like my image to be a sattelite one. How can I do it ? Is it possible? Thank you in advance.

I have already read the doc of earth engine. I find this programm :

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.9, 116.3849, 40.0]);

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

But it give me a corrupted file

4

2 回答 2

1

除了mikoontz的回答,您不能只使用常规图像查看器查看 GeoTIFF 图像,而是尝试使用任何GeoTIFF图像查看器软件。

观众名单:https ://www.gislounge.com/free-gis-data-viewers/

注意:其中大多数不仅仅是查看器,它们能够做的不仅仅是查看 GeoTIFF 图像。

于 2018-03-15T13:27:40.760 回答
1

我看到您提供的代码的唯一错误是它format不是您可以传递给Export.image.toDrive()函数的参数之一。

当我删除format: "png"您的部分代码时,我test.tif在我的 Google Drive 中得到了一个我期望的文件。在 Google Earth Engine Javascript 编辑器中,可以导出图像的唯一格式是 geotiff ( .tif) 文件。

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.9, 116.3849, 40.0]);

// Export the image, specifying scale and region. 

Export.image.toDrive({ image: landsat, description: 'test', scale: 30, region: geometry});

这是该脚本的链接

请记住,您从此代码中获得的 3 波段图像在某些应用程序中可能无法很好地呈现,即使所有数据仍然存在。看起来文件已损坏,但代码确实会生成可用的 geotiff 文件。

为了说明这一点,当我在 Mac 上的 Preview 中打开文件时,它看起来像这样:

test.tif 在预览中打开

但是如果我在 QGIS 中打开它,它看起来像这样:

在 QGIS 中打开的 test.tif

于 2018-02-03T00:33:23.500 回答