I have a Sentinel 1 image collection and I want to filter the images that completely overlap my region of interest. filterBounds()
keeps the images that partially overlap my ROI. While browsing the GEE documentation I found ee.Filter.contains()
, however I did not understand the inputs of the function.
I tried the following but it didn't work
var imageCollection = ee.ImageCollection("COPERNICUS/S1_GRD");
var S1_filtered = imageCollection.filter(ee.Filter.contains(geometry))
Map.addLayer(S1_filtered)
where geometry
is a rectangle that I drew on the map having the following coordinates:
coordinates: List (1 element)
0: List (5 elements)
0: [11.242486382607296,53.14196639066307]
1: [11.720391656044796,53.14196639066307]
2: [11.720391656044796,53.48654847659319]
3: [11.242486382607296,53.48654847659319]
4: [11.242486382607296,53.14196639066307]
When I run this code I obtain the following error message:
Layer 1: Layer error: String: Unable to convert object to string.
How can I use ee.Filter.contains()
to filter an image collection with a polygon?