ee.Image

Earth Engine 画像を表すオブジェクト。このコンストラクタは、さまざまな引数を受け入れます。

  - 文字列: EarthEngine アセット ID、

  - 文字列と数値: EarthEngine アセット ID とバージョン、

  - 数値または ee.Array: 定数画像を作成します。

  - リスト: 各リスト要素から画像を作成し、それらを 1 つの画像に結合します。

  - ee.Image: 引数を返します。

  - Nothing: 空の透明な画像になります。

用途戻り値
ee.Image(args)画像
引数タイプ詳細
argsImage|List、省略可コンストラクタの引数。

コードエディタ(JavaScript)

var image = ee.Image('NASA/NASADEM_HGT/001');

Map.setZoom(3);
Map.addLayer(image.select('elevation'), {min: -1e3, max: 5e3}, 'Elevation');
// Image NASA/NASADEM_HGT/001 (3 bands)
// type: Image
// id: NASA/NASADEM_HGT/001
// version: 1641990521971299
// bands: List (3 elements)
// properties: Object (22 properties)
print(image);

var transparent = ee.Image();
Map.addLayer(transparent, null, 'transparent', false);
// Image (1 band)
// type: Image
// bands: List (1 element)
// 0: "constant", int ∈ [0, 0], EPSG:4326
print(transparent);

// Create a multi-band image from a list of constants.
var orange = ee.Image([0xff, 0x88, 0x00]);
Map.addLayer(orange, {min: 0, max: 0xff}, 'orange', false);
// Image (3 bands)
// type: Image
// bands: List (3 elements)
// 0: "constant", int ∈ [255, 255], EPSG:4326
// 1: "constant_1", int ∈ [136, 136], EPSG:4326
// 2: "constant_2", int ∈ [0, 0], EPSG:4326
print(orange);

// Create a one band image where each pixel is an array of three values.
var imageOfArray = ee.Image(ee.Array([0x00, 0x00, 0xff]));
Map.addLayer(imageOfArray, null, 'imageOfArray', false);
// Image (1 band)
// type: Image
// bands: List (1 element)
// 0: "constant", unsigned int8, 1 dimension, EPSG:4326
// id: constant
// crs: EPSG:4326
// crs_transform: [1,0,0,0,1,0]
// data_type: unsigned int8, 1 dimension
// type: PixelType
// dimensions: 1
// max: 255
// min: 0
// precision: int
print(imageOfArray);

Python の設定

Python API とインタラクティブな開発での geemap の使用については、 Python 環境のページをご覧ください。

import ee
import geemap.core as geemap

Colab(Python)

image = ee.Image('NASA/NASADEM_HGT/001')

m = geemap.Map()
m.zoom = 3
display(m)
m.add_layer(image.select('elevation'), {'min': -1e3, 'max': 5e3}, 'Elevation')
# Image NASA/NASADEM_HGT/001 (3 bands)
# type: Image
# id: NASA/NASADEM_HGT/001
# version: 1641990521971299
# 'bands': List (3 elements)
# properties: Object (22 properties)
display(image)

transparent = ee.Image()
m.add_layer(transparent, None, 'transparent', False)
# Image (1 band)
# type: Image
# 'bands': List (1 element)
# 0: "constant", int ∈ [0, 0], EPSG:4326
display(transparent)

# Create a multi-band image from a list of constants.
orange = ee.Image([0xFF, 0x88, 0x00])
m.add_layer(orange, {'min': 0, 'max': 0xFF}, 'orange', False)
# Image (3 bands)
# type: Image
# 'bands': List (3 elements)
# 0: "constant", int ∈ [255, 255], EPSG:4326
# 1: "constant_1", int ∈ [136, 136], EPSG:4326
# 2: "constant_2", int ∈ [0, 0], EPSG:4326
display(orange)

# Create a one band image where each pixel is an array of three values.
image_of_array = ee.Image(ee.Array([0x00, 0x00, 0xFF]))
m.add_layer(image_of_array, None, 'image_of_array', False)
# Image (1 band)
# type: Image
# 'bands': List (1 element)
# 0: "constant", unsigned int8, 1 dimension, EPSG:4326
# id: constant
# crs: EPSG:4326
# crs_transform: [1,0,0,0,1,0]
# data_type: unsigned int8, 1 dimension
# type: PixelType
# dimensions: 1
# 'max': 255
# 'min': 0
# precision: int
display(image_of_array)