javascript - 如何从 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 值。
解决方案
首先,看看这里的指南: https ://developers.google.com/earth-engine/guides/exporting
在 Export.image.toDrive 中有多种方法可以解决这个问题:
- 指定区域 - 创建几何并在导出中指定其名称(例如区域:几何)
- 如果导出大比例图像 - 缩小比例(例如比例:20)
- 如果您真的想要您所在地区的完整分辨率 - 将“maxPixels:”添加到您的导出并增加我上面链接的指南中指定的值(例如 maxPixels:1e10)
为了加快您的工作流程,还可以通过添加 .filterBounds(geometry) 将 imageCollection 中的数据过滤到几何中
推荐阅读
- windows-installer - CAQuietExec:尝试执行复制文件时访问被拒绝
- mysql - Mysql按位运算
- reactjs - 如何使用 React 和 Redux 处理整个应用程序的单个加载指示器?
- java - 在 IntelliJ IDEA 中导航到声明、类型声明、实现有什么区别?
- apache-kafka - Kafka - 如何保证来自不同主题的消息按顺序到达
- python - 类型错误:数据帧的“str”和“int”实例之间不支持“>=”
- symfony4 - 带有 Symfony 4 的 Saml 2.0 身份提供程序
- firebase - 如何计算firebase文件的长度?
- c++ - 无法在我的链表上插入项目,头部始终为 NULL
- raku - 将时间线可视化与 Comma IDE 一起使用时“无法获取时间线数据”