お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、Earth Engine へのアクセスを維持するために
非商用目的での利用資格を確認する必要があります。
ee.ImageCollection.iterate
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ユーザーが指定した関数をコレクションの各要素に適用します。ユーザーが指定した関数には、現在の要素と、前の iterate() 呼び出しで返された値(最初の反復処理の場合は最初の引数)の 2 つの引数が渡されます。結果は、ユーザー指定の関数に対する最後の呼び出しによって返される値です。
Collection.iterate() 呼び出しの結果を返します。
用途 | 戻り値 |
---|
ImageCollection.iterate(algorithm, first) | ComputedObject |
引数 | タイプ | 詳細 |
---|
これ: collection | コレクション | Collection インスタンス。 |
algorithm | 関数 | 各要素に適用する関数。コレクションの要素と前のイテレーションの値の 2 つの引数を取る必要があります。 |
first | オブジェクト、省略可 | 初期状態。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eApplies a custom function iteratively to each element of a collection, using the previous result in each subsequent calculation.\u003c/p\u003e\n"],["\u003cp\u003eReturns the final computed value after applying the function across all elements.\u003c/p\u003e\n"],["\u003cp\u003eBegins with an initial state (optional) and updates it based on the user-provided function and each element in the collection.\u003c/p\u003e\n"],["\u003cp\u003eUseful for implementing custom algorithms or calculations across collections like ImageCollections.\u003c/p\u003e\n"]]],["`iterate()` applies a user-defined function to each collection element. This function receives the current element and the prior iteration's result as arguments. The process starts with an optional initial state (`first`). The final output is the value produced by the user-defined function's last execution. It's used on a `Collection` with the `algorithm` being a function and `first` as optional. It returns a `ComputedObject`.\n"],null,["# ee.ImageCollection.iterate\n\n\u003cbr /\u003e\n\nApplies a user-supplied function to each element of a collection. The user-supplied function is given two arguments: the current element, and the value returned by the previous call to iterate() or the first argument, for the first iteration. The result is the value returned by the final call to the user-supplied function.\n\n\u003cbr /\u003e\n\nReturns the result of the Collection.iterate() call.\n\n| Usage | Returns |\n|-------------------------------------------------|----------------|\n| ImageCollection.iterate`(algorithm, `*first*`)` | ComputedObject |\n\n| Argument | Type | Details |\n|--------------------|------------------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| this: `collection` | Collection | The Collection instance. |\n| `algorithm` | Function | The function to apply to each element. Must take two arguments: an element of the collection and the value from the previous iteration. |\n| `first` | Object, optional | The initial state. |"]]