Announcement: All noncommercial projects registered to use Earth Engine beforeApril 15, 2025 mustverify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.

ee.Filter.eq

  • Filters metadata to a given value.

  • Returns a constructed filter.

  • Takesname (String) andvalue (Object) as arguments.

  • Can be used in JavaScript and Python with the Earth Engine API.

Filter to metadata equal to the given value.

Returns the constructed filter.

UsageReturns
ee.Filter.eq(name, value)Filter
ArgumentTypeDetails
nameStringThe property name to filter on.
valueObjectThe value to compare against.

Examples

Code Editor (JavaScript)

// The GOES Mesoscale images come in two domains.// Separate the two groups using ee.Filter.eq.vargoes17_mcmipm=ee.ImageCollection('NOAA/GOES/17/MCMIPM');vargoes17_mcmipm_2019=goes17_mcmipm.filterDate(ee.Date('2019-11-01'),ee.Date('2019-11-05'));vard1=goes17_mcmipm_2019.filter(ee.Filter.eq('domain',1));vard2=goes17_mcmipm_2019.filter(ee.Filter.eq('domain',2));print(goes17_mcmipm_2019.size());print(d1.size());print(d2.size());

Python setup

See the Python Environment page for information on the Python API and usinggeemap for interactive development.

importeeimportgeemap.coreasgeemap

Colab (Python)

# The GOES Mesoscale images come in two domains.# Separate the two groups using ee.Filter.eq.goes17_mcmipm=ee.ImageCollection('NOAA/GOES/17/MCMIPM')goes17_mcmipm_2019=goes17_mcmipm.filterDate(ee.Date('2019-11-01'),ee.Date('2019-11-05'))d1=goes17_mcmipm_2019.filter(ee.Filter.eq('domain',1))d2=goes17_mcmipm_2019.filter(ee.Filter.eq('domain',2))display(goes17_mcmipm_2019.size())display(d1.size())display(d2.size())

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2023-10-06 UTC.