Annuncio: tutti i progetti non commerciali registrati per l'utilizzo di Earth Engine prima del
15 aprile 2025 devono
verificare l'idoneità non commerciale per mantenere l'accesso a Earth Engine.
ee.Image
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Un oggetto per rappresentare un'immagine di Earth Engine. Questo costruttore accetta una serie di argomenti:
- Una stringa: un ID asset Earth Engine,
- Una stringa e un numero: un ID asset e una versione di Earth Engine,
- Un numero o ee.Array: crea un'immagine costante,
- Un elenco: crea un'immagine da ogni elemento dell'elenco e le combina in un'unica immagine.
- ee.Image: restituisce l'argomento,
- Niente: il risultato è un'immagine trasparente vuota.
Utilizzo | Resi |
---|
ee.Image(args) | Immagine |
Argomento | Tipo | Dettagli |
---|
args | Image|List<Object>|Number|Object|String, facoltativo | Argomento del costruttore. |
Esempi
Editor di codice (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);
Configurazione di Python
Consulta la pagina
Ambiente Python per informazioni sull'API Python e sull'utilizzo di
geemap
per lo sviluppo interattivo.
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)
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 2025-07-25 UTC."],[[["\u003cp\u003e\u003ccode\u003eee.Image()\u003c/code\u003e is a constructor used to create or represent Earth Engine images.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts arguments such as asset IDs, constants, lists, and other images to construct an image object.\u003c/p\u003e\n"],["\u003cp\u003eWhen called with no arguments, it generates an empty, transparent image.\u003c/p\u003e\n"],["\u003cp\u003eIt enables users to create images from a variety of sources, including asset IDs, constants, lists and more, making them ready for analysis and visualization.\u003c/p\u003e\n"]]],["The core content details creating Earth Engine images using `ee.Image()`. Images can be constructed from an asset ID string, an ID and version number, a number/`ee.Array` for constant images, or a list that becomes a multi-band image. An existing `ee.Image` will return the argument, and calling with nothing results in a transparent image. Examples demonstrate loading asset images, generating constant or multi-band images, and displaying these results using code examples in Javascript and Python.\n"],null,["# ee.Image\n\n\u003cbr /\u003e\n\nAn object to represent an Earth Engine image. This constructor accepts a variety of arguments:\n\n\u003cbr /\u003e\n\n- A string: an EarthEngine asset id,\n\n- A string and a number: an EarthEngine asset id and version,\n\n- A number or ee.Array: creates a constant image,\n\n- A list: creates an image out of each list element and combines them into a single image,\n\n- An ee.Image: returns the argument,\n\n- Nothing: results in an empty transparent image.\n\n| Usage | Returns |\n|----------------------|---------|\n| `ee.Image(`*args*`)` | Image |\n\n| Argument | Type | Details |\n|----------|---------------------------------------------------------|-----------------------|\n| `args` | Image\\|List\\\u003cObject\\\u003e\\|Number\\|Object\\|String, optional | Constructor argument. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\nvar image = ee.Image('NASA/NASADEM_HGT/001');\n\nMap.setZoom(3);\nMap.addLayer(image.select('elevation'), {min: -1e3, max: 5e3}, 'Elevation');\n// Image NASA/NASADEM_HGT/001 (3 bands)\n// type: Image\n// id: NASA/NASADEM_HGT/001\n// version: 1641990521971299\n// bands: List (3 elements)\n// properties: Object (22 properties)\nprint(image);\n\nvar transparent = ee.Image();\nMap.addLayer(transparent, null, 'transparent', false);\n// Image (1 band)\n// type: Image\n// bands: List (1 element)\n// 0: \"constant\", int ∈ [0, 0], EPSG:4326\nprint(transparent);\n\n// Create a multi-band image from a list of constants.\nvar orange = ee.Image([0xff, 0x88, 0x00]);\nMap.addLayer(orange, {min: 0, max: 0xff}, 'orange', false);\n// Image (3 bands)\n// type: Image\n// bands: List (3 elements)\n// 0: \"constant\", int ∈ [255, 255], EPSG:4326\n// 1: \"constant_1\", int ∈ [136, 136], EPSG:4326\n// 2: \"constant_2\", int ∈ [0, 0], EPSG:4326\nprint(orange);\n\n// Create a one band image where each pixel is an array of three values.\nvar imageOfArray = ee.Image(ee.Array([0x00, 0x00, 0xff]));\nMap.addLayer(imageOfArray, null, 'imageOfArray', false);\n// Image (1 band)\n// type: Image\n// bands: List (1 element)\n// 0: \"constant\", unsigned int8, 1 dimension, EPSG:4326\n// id: constant\n// crs: EPSG:4326\n// crs_transform: [1,0,0,0,1,0]\n// data_type: unsigned int8, 1 dimension\n// type: PixelType\n// dimensions: 1\n// max: 255\n// min: 0\n// precision: int\nprint(imageOfArray);\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\nimage = ee.Image('NASA/NASADEM_HGT/001')\n\nm = geemap.Map()\nm.zoom = 3\ndisplay(m)\nm.add_layer(image.select('elevation'), {'min': -1e3, 'max': 5e3}, 'Elevation')\n# Image NASA/NASADEM_HGT/001 (3 bands)\n# type: Image\n# id: NASA/NASADEM_HGT/001\n# version: 1641990521971299\n# 'bands': List (3 elements)\n# properties: Object (22 properties)\ndisplay(image)\n\ntransparent = ee.Image()\nm.add_layer(transparent, None, 'transparent', False)\n# Image (1 band)\n# type: Image\n# 'bands': List (1 element)\n# 0: \"constant\", int ∈ [0, 0], EPSG:4326\ndisplay(transparent)\n\n# Create a multi-band image from a list of constants.\norange = ee.Image([0xFF, 0x88, 0x00])\nm.add_layer(orange, {'min': 0, 'max': 0xFF}, 'orange', False)\n# Image (3 bands)\n# type: Image\n# 'bands': List (3 elements)\n# 0: \"constant\", int ∈ [255, 255], EPSG:4326\n# 1: \"constant_1\", int ∈ [136, 136], EPSG:4326\n# 2: \"constant_2\", int ∈ [0, 0], EPSG:4326\ndisplay(orange)\n\n# Create a one band image where each pixel is an array of three values.\nimage_of_array = ee.Image(ee.Array([0x00, 0x00, 0xFF]))\nm.add_layer(image_of_array, None, 'image_of_array', False)\n# Image (1 band)\n# type: Image\n# 'bands': List (1 element)\n# 0: \"constant\", unsigned int8, 1 dimension, EPSG:4326\n# id: constant\n# crs: EPSG:4326\n# crs_transform: [1,0,0,0,1,0]\n# data_type: unsigned int8, 1 dimension\n# type: PixelType\n# dimensions: 1\n# 'max': 255\n# 'min': 0\n# precision: int\ndisplay(image_of_array)\n```"]]