ee.Filter.eq

篩選中繼資料,只顯示等於指定值的項目。

傳回建構的篩選器。

用量傳回
ee.Filter.eq(name, value)篩選器
引數類型詳細資料
name字串要篩選的屬性名稱。
value物件要比較的基準值。

範例

程式碼編輯器 (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_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 設定

請參閱 Python 環境頁面,瞭解 Python API 和如何使用 geemap 進行互動式開發。

import ee
import geemap.core as geemap

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))
print(goes17_mcmipm_2019.size().getInfo())
print(d1.size().getInfo())
print(d2.size().getInfo())