I want to download Sentinel-1 SAR data for both VV and VH with IW only within a rectangular polygon? I could download with the ROI, but even though ROI is a rectangle, the output to export is a rectangle.
The red rectangle is my ROI, but it's taking the extreme coordinates and making a square that encloses the ROI and exporting that output as shown.
I only want the data inside the ROI.
I even tried to use ee.Image.clip. But I couldn't able to comeup with a solution which can download the data. It was going to a large file
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
//}
});
I'm getting the following error message.
Error: Export too large: specified 6875185131 pixels (max: 100000000). Specify higher maxPixels value if you intend to export a large area.
.clip()
work for you?