google earth engine- Sentienel 1 Download Image Colllection

689 views Asked by At

I am trying to download availables scenes of sentinel 1-GRD into a date range. I have done this for a composite image and It has been worked properly but It is doesn´t work for an images collection.

My aim is to downnload all images GRD (VV + VH polarisation) into a given area (geometry). This is my code:

//
// Load the Sentinel-1 ImageCollection.
var imgVV = ee.ImageCollection('COPERNICUS/S1_GRD')
        .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
        .filter(ee.Filter.eq('instrumentMode', 'IW'));

var desc = imgVV.filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING'));
var asc = imgVV.filter(ee.Filter.eq('orbitProperties_pass', 'ASCENDING'));

var date = ee.Filter.date('2015-03-01', '2015-06-20');

var ascChange = ee.ImageCollection(asc.filter(date).filterBounds(ee.Geometry.Polygon(geometry)));

Map.setCenter(3.3478, 39.6218, 12);
Map.addLayer(ascChange, {min: -25, max: 5}, 'Multi-T Mean ASC', true);

//print(ee.List([asChange]));

Export.image.toDrive({
  image: ascChange,
  description:'Ascendente_CMillor',
  scale: 10,
  region: geometry
})

ERROR:Multi-T Mean ASC: Layer error: Unknown variable references: []. //

I think the problem should be when it tries to build the 'Multi-T Mean ASC' list of images but I do not know how to configure it in order to rename each scene with its date and type of orbitProperties_pass (ASC/DESC)

Finally, My idea is to obtain the results (images to download) renamed as scenedate_orbitProperties_pass_GRD.tiff

Can somebody help me?

Thanks, Juanjo

1

There are 1 answers

2
hooge048 On BEST ANSWER

The error is related to the way you're filtering the bounds of the ImageCollection. Instead, try using .filterBounds(geometry).

Depending on your downstream usage of the exported imagery, you can export all images in the IC as individual images using this approach. Alternatively, you can export all images in the ImageCollection as one single multiband image with .toBands().

// Mock geometry
var geometry = ee.Geometry.Polygon([[3.2,39.5], [3.3,39.5], [3.3,39.7], [3.2,39.7], [3.2,39.5]])

// Load the Sentinel-1 ImageCollection.
var imgVV = ee.ImageCollection('COPERNICUS/S1_GRD')
        .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
        .filter(ee.Filter.eq('instrumentMode', 'IW'));
var desc = imgVV.filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING'));
var asc = imgVV.filter(ee.Filter.eq('orbitProperties_pass', 'ASCENDING'));

// Filter by date and geometry, create multiband image and clip to geometry
var ascChange = ee.ImageCollection(asc.filterDate('2015-03-01', '2015-06-20')).filterBounds(geometry).toBands().toFloat().clip(geometry)

Map.setCenter(3.3478, 39.6218, 12);
Map.addLayer(ascChange, {min: -25, max: 5}, 'Multi-T Mean ASC', true);

Export.image.toDrive({
  image: ascChange,
  description:'Ascendente_CMillor',
  fileNamePrefix: 'scenedate_orbitProperties_pass_GRD',
  scale: 10,
  region: geometry})