Earth Engine は、共有コンピューティング リソースを保護し、すべてのユーザーに信頼性の高いパフォーマンスを提供するために、
非商用割り当て階層を導入しています。すべての非商用プロジェクトは、
2026 年 4 月 27 日までに割り当て階層を選択する必要があります。選択しない場合は、デフォルトでコミュニティ階層が使用されます。階層の割り当ては、
2026 年 4 月 27 日に(階層の選択日に関係なく)すべてのプロジェクトで有効になります。
詳細
ee.Filter.calendarRange
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
オブジェクトのタイムスタンプがカレンダー フィールドの指定範囲内にある場合にパスするフィルタを返します。
month、
day_of_year、
day_of_month、
day_of_week は 1 から始まります。時刻は UTC であると想定されます。週は月曜日を 1 日目として始まると想定されます。
end < start の場合、このテストでは value >= start または value <= end をテストして、折り返しを許可します。
| 用途 | 戻り値 |
|---|
ee.Filter.calendarRange(start, end, field) | フィルタ |
| 引数 | タイプ | 詳細 |
|---|
start | 整数 | 目的の暦フィールドの開始値(この値を含む)。 |
end | 整数、デフォルト: null | 目的のカレンダー フィールドの終了(その日付を含む)。デフォルトは start と同じ値です。 |
field | 文字列、デフォルト: 「day_of_year」 | フィルタリングするカレンダー フィールド。オプションは、`year`、`month`、`hour`、`minute`、`day_of_year`、`day_of_month`、`day_of_week` です。 |
例
コードエディタ(JavaScript)
// A Sentinel-2 surface reflectance image collection intersecting the peak of
// Mount Shasta, California, USA.
var ic = ee.ImageCollection('COPERNICUS/S2_SR')
.filterBounds(ee.Geometry.Point(-122.196, 41.411));
print('Images for a month range (June-August)',
ic.filter(ee.Filter.calendarRange(6, 8, 'month')));
print('A start value greater than end value is valid (Dec-Feb)',
ic.filter(ee.Filter.calendarRange(12, 2, 'month')));
// This example uses the 'year' field value. Note that ee.Filter.date is the
// preferred method when filtering by whole years, as it is much faster.
print('Images for a year range (2020-2021)',
ic.filter(ee.Filter.calendarRange(2020, 2021, 'year')));
// This example uses the 'day_of_year' field value. Note that
// ee.Filter.dayOfYear is the preferred method for filtering by DOY.
// The ee.Date.getRelative function is used to identify DOY from an ee.Date
// object for a representative year. Be mindful of leap years when filtering
// by DOY.
var startDoy = ee.Date('2000-06-01').getRelative('day', 'year');
var endDoy = ee.Date('2000-06-15').getRelative('day', 'year');
print('start DOY =', startDoy,
'end DOY =', endDoy,
'Images for a day-of-year range',
ic.filter(ee.Filter.calendarRange(startDoy, endDoy, 'day_of_year')));
Python の設定
Python API とインタラクティブな開発での geemap の使用については、
Python 環境ページをご覧ください。
import ee
import geemap.core as geemap
Colab(Python)
# A Sentinel-2 surface reflectance image collection intersecting the peak of
# Mount Shasta, California, USA.
ic = ee.ImageCollection('COPERNICUS/S2_SR').filterBounds(
ee.Geometry.Point(-122.196, 41.411))
display('Images for a month range (June-August):',
ic.filter(ee.Filter.calendarRange(6, 8, 'month')))
display('A start value greater than end value is valid (Dec-Feb):',
ic.filter(ee.Filter.calendarRange(12, 2, 'month')).size())
# This example uses the 'year' field value. Note that ee.Filter.date is the
# preferred method when filtering by whole years, as it is much faster.
display('Images for a year range (2020-2021):',
ic.filter(ee.Filter.calendarRange(2020, 2021, 'year')).size())
# This example uses the 'day_of_year' field value. Note that
# ee.Filter.dayOfYear is the preferred method for filtering by DOY.
# The ee.Date.getRelative function is used to identify DOY from an ee.Date
# object for a representative year. Be mindful of leap years when filtering
# by DOY.
start_doy = ee.Date('2000-06-01').getRelative('day', 'year')
end_doy = ee.Date('2000-06-15').getRelative('day', 'year')
display('start DOY =', start_doy, 'end DOY =', end_doy)
display(
'Images for a day-of-year range:',
ic.filter(ee.Filter.calendarRange(start_doy, end_doy, 'day_of_year'))
)
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2026-04-20 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2026-04-20 UTC。"],[],[]]