ee.Filter.eq
Filter to metadata equal to the given value.
Returns the constructed filter.
Usage | Returns |
---|
ee.Filter.eq(name, value) | Filter |
Argument | Type | Details |
---|
name | String | The property name to filter on. |
value | Object | The value to compare against. |
Examples
// 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_2019 =
goes17_mcmipm.filterDate(ee.Date('2019-11-01'), ee.Date('2019-11-05'));
var d1 = goes17_mcmipm_2019.filter(ee.Filter.eq('domain', 1));
var d2 = 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 using
geemap
for interactive development.
import ee
import geemap.core as geemap
# 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))
print(goes17_mcmipm_2019.size().getInfo())
print(d1.size().getInfo())
print(d2.size().getInfo())
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["`ee.Filter.eq()` filters an ImageCollection based on property values, returning a new filtered collection."],["It takes two arguments: `name` (the property to filter on) and `value` (the value to match)."],["This filter is useful for selecting specific data within an ImageCollection, such as isolating images with particular metadata attributes, as demonstrated with the GOES Mesoscale imagery example."]]],[]]