2

I'm trying to create image collection from images of Sentinel-1.I have written a code that suppoose to create image collection, clip it with a given polygon and then count the number of images in the image collection. The problems are-

  1. It takes very long time to calculte, seems like it's very heavy, that compared to similar processes I have run with optical data from sentinel-2.

  2. The result I get is wrong- I got count of 34,793 images for period of two months for a little polygon in Thailand area.

What do I do wrong? I have to mention that i'm new to Sentinel 1 and i'm trying to study it alone so if you have any reccomendation for good guides for how to use it in GEE for agriculture use it will be very helpful.

This is the code I hav written-


// Load the Sentinel-1 ImageCollection.
var sentinel= ee.ImageCollection('COPERNICUS/S1_GRD');

//filter by metadata properties

var imgVV=sentinel.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV')).filter(ee.Filter.eq('instrumentMode', 'IW'))
.filterDate('2017-02-10','2017-04-01').map(function(im){ 
  return im.clip(geometry);});


// var clippedCol=imgVV.map(function(im){ 
//   return im.clip(geometry);
// });

var count = imgVV.size();
print('Count: ',count);

1 Answer 1

2

The issue is that you are creating the collection based on the date, and then clipping every image with your function. (even those that don't contain your geometry .... the whole globe)

Change your code with a .filterBounds(geometry) before doing the clipping.

// Load the Sentinel-1 ImageCollection.
var sentinel= ee.ImageCollection('COPERNICUS/S1_GRD');

//filter by metadata properties

var imgVV=sentinel.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
     .filter(ee.Filter.eq('instrumentMode', 'IW'))
     .filterDate('2017-02-10','2017-04-01')
     .filterBounds(geometry) // Filter bounds of the geometry
     .map(function(im){ 
        return im.clip(geometry);
});


// var clippedCol=imgVV.map(function(im){ 
//   return im.clip(geometry);
// });

var count = imgVV.size();
print('Count: ',count); // 15 images

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.