お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、アクセスを維持するために
非商用目的での利用資格を確認する必要があります。2025 年 9 月 26 日までに確認が完了していない場合、アクセスが保留されることがあります。
ee.Array
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
指定された座標を含む配列を返します。
用途 | 戻り値 |
---|
ee.Array(values, pixelType) | 配列 |
引数 | タイプ | 詳細 |
---|
values | オブジェクト | キャストする既存の配列、または配列の作成元となる任意の深さの数値/数値のリスト/数値のネストされたリスト。ネストされたリストの場合、同じ深さにあるすべての内部配列は同じ長さにする必要があります。数値は最も深いレベルにのみ存在できます。 |
pixelType | PixelType、デフォルト: null | values 引数の各数値の型。ピクセルタイプが指定されていない場合は、'values' の数値から推測されます。「values」に数値がない場合は、このタイプを指定する必要があります。 |
例
コードエディタ(JavaScript)
// Requires an explicit PixelType if no data.
print(ee.Array([], ee.PixelType.int8())); // Empty []
print(ee.Array([[]], ee.PixelType.uint8())); // Empty [[]]
print(ee.Array([[], []], ee.PixelType.float())); // Empty [[], []]
// 1-D Arrays
print(ee.Array([0])); // [0]
print(ee.Array([0, 1])); // [0, 1]
// 2-D Arrays
print(ee.Array([[1]])); // [[1]]
print(ee.Array([[0, 1], [2, 3]])); // [[0,1],[2,3]]
// Arrays from ee.Number.
print(ee.Array([ee.Number(123).toUint8()])); // [123]
// Lists are useful ways to construct larger Arrays.
print(ee.Array(ee.List.sequence(0, 10, 2))); // // [0,2,4,6,8,10]
// Arrays can be used to make Arrays.
var array1D = ee.Array([1, 2, 3]);
// This is a cast.
print(ee.Array(array1D)); // [1,2,3]
Python の設定
Python API とインタラクティブな開発での geemap
の使用については、
Python 環境のページをご覧ください。
import ee
import geemap.core as geemap
Colab(Python)
# Requires an explicit PixelType if no data.
print(ee.Array([], ee.PixelType.int8()).getInfo()) # Empty []
print(ee.Array([[]], ee.PixelType.uint8()).getInfo()) # Empty [[]]
print(ee.Array([[], []], ee.PixelType.float()).getInfo()) # Empty [[], []]
# 1-D Arrays
print(ee.Array([0]).getInfo()) # [0]
print(ee.Array([0, 1]).getInfo()) # [0, 1]
# 2-D Arrays
print(ee.Array([[1]]).getInfo()) # [[1]]
print(ee.Array([[0, 1], [2, 3]]).getInfo()) # [[0,1],[2,3]]
# Arrays from ee.Number.
print(ee.Array([ee.Number(123).toUint8()]).getInfo()) # [123]
# Lists are useful ways to construct larger Arrays.
print(ee.Array(ee.List.sequence(0, 10, 2)).getInfo()) # [0, 2, 4, 6, 8, 10]
# Arrays can be used to make Arrays.
array_one = ee.Array([1, 2, 3])
# This is a cast.
print(ee.Array(array_one).getInfo()) # [1, 2, 3]
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 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"]],["最終更新日 2025-07-26 UTC。"],[],[]]