Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain Earth Engine access.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eImageCollection.filter()\u003c/code\u003e allows you to apply a filter to an ImageCollection, resulting in a new collection containing only the images that match the filter criteria.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003efilter\u003c/code\u003e argument accepts a Filter object, such as one created with \u003ccode\u003eee.Filter.eq\u003c/code\u003e, to define the filtering conditions.\u003c/p\u003e\n"],["\u003cp\u003eThis method is useful for subsetting collections based on properties like date, metadata, or image content.\u003c/p\u003e\n"],["\u003cp\u003eApplying a filter with criteria that no images satisfy will return an empty collection.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\nApply a filter to this collection.\n\n\u003cbr /\u003e\n\nReturns the filtered collection.\n\n| Usage | Returns |\n|----------------------------------|------------|\n| ImageCollection.filter`(filter)` | Collection |\n\n| Argument | Type | Details |\n|--------------------|------------|---------------------------------------|\n| this: `collection` | Collection | The Collection instance. |\n| `filter` | Filter | A filter to apply to this collection. |\n\nExamples\n\nCode Editor (JavaScript) \n\n```javascript\n// The GOES Mesoscale images come in two domains.\n// Separate the two groups using ee.Filter.eq.\nvar goes17_mcmipm = ee.ImageCollection('NOAA/GOES/17/MCMIPM');\nvar goes17_mcmipm_day =\n goes17_mcmipm.filterDate('2020-09-26', '2020-09-27');\n\nvar d1 = goes17_mcmipm_day.filter('domain == 1');\nvar d2 = goes17_mcmipm_day.filter('domain == 2');\n// domain 3 does not exist.\nvar d3 = goes17_mcmipm_day.filter('domain == 3');\n\nprint(goes17_mcmipm_day.size());\nprint(d1.size());\nprint(d2.size());\nprint(d3.size());\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\nColab (Python) \n\n```python\n# The GOES Mesoscale images come in two domains.\n# Separate the two groups using ee.Filter.eq.\ngoes17_mcmipm = ee.ImageCollection('NOAA/GOES/17/MCMIPM')\ngoes17_mcmipm_day = goes17_mcmipm.filterDate('2020-09-26', '2020-09-27')\n\nd1 = goes17_mcmipm_day.filter('domain == 1')\nd2 = goes17_mcmipm_day.filter('domain == 2')\n# domain 3 does not exist.\nd3 = goes17_mcmipm_day.filter('domain == 3')\n\nprint(goes17_mcmipm_day.size().getInfo())\nprint(d1.size().getInfo())\nprint(d2.size().getInfo())\nprint(d3.size().getInfo())\n```"]]