问题描述
我只想在矩形多边形内下载带有 IW 的 VV 和 VH 的 Sentinel-1 SAR 数据?我可以使用 ROI 下载,但即使 ROI 是一个矩形,要导出的输出也是一个矩形。
红色矩形是我的 ROI,但它采用极端坐标并制作一个包含 ROI 的正方形,然后如图所示导出该输出。
我只想要 ROI 内的数据。
我什至尝试使用 ee.Image.clip。但我无法想出一个可以下载数据的解决方案。这是一个大文件
var start_date = ee.Date('2019-05-01');
finish_date = ee.Date('2019-06-15');
var orbit = 'ASCENDING';
var collectionS1 = ee.ImageCollection('copERNICUS/S1_Grd')
.filter(ee.Filter.listContains('transmitterReceiverPolarisation','VV'))
.filter(ee.Filter.eq('instrumentMode','IW'))
// .filter(ee.Filter.eq('orbitProperties_pass',orbit))
.filterDate(start_date,finish_date)
//.filterBounds(polygons);
// Get the VV collection.
var collectionVV = collectionS1.select('VV');
// Get the VH collection.
var collectionVH = collectionS1.select('VH');
var VV = ee.Image(collectionVV.first().clip(roi_A); //roi_A is my rectangular roi
var VH = ee.Image(collectionVH.first());
// I would like to take VV and VH and stack them and download
var VVVH = VV.addBands(VH)
Export.image.toDrive({
image: VV,description: 'A_ERT',scale: 10,//region: ROI,fileFormat: 'GeoTIFF',//formatOptions: {
// cloudOptimized: true
//}
});
我收到以下错误消息。
错误:导出太大:指定的 6875185131 像素(最大:100000000)。如果您打算导出大区域,请指定更高的 maxPixels 值。
解决方法
首先,看看这里的指南: https://developers.google.com/earth-engine/guides/exporting
Export.image.toDrive 中有多种方法可以解决此问题:
- 指定区域 - 创建几何图形并在导出中指定其名称(例如区域:几何图形)
- 如果导出大型图像 - 缩小比例(例如比例:20)
- 如果您真的想要您所在地区的完整分辨率 - 将“maxPixels:”添加到您的导出并增加我上面链接的指南中指定的值(例如 maxPixels:1e10)
为了加快工作流程,还可以通过添加 .filterBounds(geometry) 将 imageCollection 中的数据过滤到几何体