お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、Earth Engine へのアクセスを維持するために
非商用目的での利用資格を確認する必要があります。
配列の概要
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Earth Engine では、1 次元ベクトル、2 次元行列、3 次元キューブ、高次元ハイパーキューブを ee.Array
型で表します。配列は柔軟なデータ構造ですが、その柔軟性と引き換えに、Earth Engine の他のデータ構造ほどスケーリングできません。配列を使用せずに問題を解決できる場合は、結果がより速く効率的に計算されます。ただし、問題に高次元モデル、柔軟な線形代数、または配列に固有の適合性が必要である場合は、Array
クラスを使用できます。
配列のディメンション、形状、サイズ
配列のディメンションは、基になるデータが変化する軸の数を指します。たとえば、0 次元配列はスカラー数、1 次元配列はベクトル、2 次元配列は行列、3 次元配列はキューブ、3 次元を超える配列はハイパーキューブです。N 次元配列の場合、0 ~ N-1 の N 個の軸があります。配列の形状は、軸の長さによって決まります。軸の長さは、軸に沿った位置の数です。配列サイズ(配列内の要素の総数)は、軸の長さの積に等しくなります。スパース配列やラグ配列は現在サポートされていないため、すべての軸のすべての位置の各値に有効な数値が必要です。配列の要素型は、各要素の種類を示します。配列のすべての要素の型は同じです。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[[["\u003cp\u003eEarth Engine utilizes the \u003ccode\u003eee.Array\u003c/code\u003e type to represent vectors, matrices, cubes, and higher-dimensional hypercubes, offering a flexible but potentially less scalable data structure compared to other options.\u003c/p\u003e\n"],["\u003cp\u003eThe dimension of an array signifies the number of axes, with 0-D representing scalars, 1-D vectors, 2-D matrices, 3-D cubes, and beyond 3-D hypercubes.\u003c/p\u003e\n"],["\u003cp\u003eAn array's shape is defined by the lengths of its axes, while the total size is the product of these lengths, with each position containing a valid number due to the lack of support for sparse or ragged arrays.\u003c/p\u003e\n"]]],[],null,["Earth Engine represents 1-D vectors, 2-D matrices, 3-D cubes, and higher dimensional\nhypercubes with the `ee.Array` type. Arrays are a flexible data structure, but\nin exchange for the power they offer, they do not scale as well as other data structures\nin Earth Engine. If the problem can be solved without using arrays, the result will be\ncomputed faster and more efficiently. But if the problem requires a higher dimension model,\nflexible linear algebra, or anything else arrays are uniquely suited to, you can use\nthe `Array` class.\n\nArray dimension, shape and size\n\nThe dimension of an array refers to the number of axes along which the underlying data\nvaries. For example, 0-D arrays are scalar numbers, 1-D arrays are vectors, 2-D arrays\nare matrices, 3-D arrays are cubes, and \\\u003e3-D arrays are hyper-cubes. For an\nN-dimensional array, there are N axes from 0 to N-1. The shape of the array is\ndetermined by the lengths of the axes. The length of an axis is the number of positions\nalong it. The array size, or number of total elements in the array, equals the product\nof the axis lengths. Each value at every position on every axis must have a valid number,\nsince sparse or ragged arrays are not currently supported. The array's element type\nindicates what kind of number each element is; all elements of the array will have the\nsame type."]]