首页 > 解决方案 > 如何从 Google 地球引擎下载特定多边形的哨兵 1

问题描述

我想下载 VV 和 VH 的 Sentinel-1 SAR 数据,IW 仅在一个矩形多边形内?我可以下载 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 值。

标签: javascriptgoogle-earth-enginesentinel

解决方案


首先,看看这里的指南: https ://developers.google.com/earth-engine/guides/exporting

在 Export.image.toDrive 中有多种方法可以解决这个问题:

  1. 指定区域 - 创建几何并在导出中指定其名称(例如区域:几何)
  2. 如果导出大比例图像 - 缩小比例(例如比例:20)
  3. 如果您真的想要您所在地区的完整分辨率 - 将“maxPixels:”添加到您的导出并增加我上面链接的指南中指定的值(例如 maxPixels:1e10)

为了加快您的工作流程,还可以通过添加 .filterBounds(geometry) 将 imageCollection 中的数据过滤到几何中


推荐阅读