ee.ImageCollection.filter

Apply a filter to this collection.

Returns the filtered collection.

UsageReturns
ImageCollection.filter(filter)Collection
ArgumentTypeDetails
this: collectionCollection

The Collection instance.

filterFilter

A filter to apply to this collection.

Examples

JavaScript

// The GOES Mesoscale images come in two domains.
// Separate the two groups using ee.Filter.eq.
var goes17_mcmipm = ee.ImageCollection('NOAA/GOES/17/MCMIPM');
var goes17_mcmipm_day =
    goes17_mcmipm.filterDate('2020-09-26', '2020-09-27');

var d1 = goes17_mcmipm_day.filter('domain == 1');
var d2 = goes17_mcmipm_day.filter('domain == 2');
// domain 3 does not exist.
var d3 = goes17_mcmipm_day.filter('domain == 3');

print(goes17_mcmipm_day.size());  // 2880
print(d1.size());                 // 1440
print(d2.size());                 // 1440
print(d3.size());                 // 0

Python

# Your example goes here!