Anúncio: todos os projetos não comerciais registrados para usar o Earth Engine antes de
15 de abril de 2025 precisam
verificar a qualificação não comercial para manter o acesso ao Earth Engine.
Visão geral da imagem
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Conforme mencionado no documento Primeiros passos, os dados raster são representados como objetos Image
no Earth Engine. As imagens são compostas por uma ou mais bandas, e cada banda tem o próprio nome, tipo de dados, escala, máscara e projeção. Cada imagem tem metadados armazenados como um conjunto de propriedades.
Construtor ee.Image
É possível carregar imagens colando um ID de recurso do Earth Engine no construtor ee.Image
. Os IDs das imagens estão no Data Catalog.
Por exemplo, para um modelo de elevação digital (NASADEM):
Editor de código (JavaScript)
var loadedImage = ee.Image('NASA/NASADEM_HGT/001');
Configuração do Python
Consulte a página
Ambiente Python para informações sobre a API Python e o uso de
geemap
para desenvolvimento interativo.
import ee
import geemap.core as geemap
Colab (Python)
loaded_image = ee.Image('NASA/NASADEM_HGT/001')
Encontrar uma imagem usando a
ferramenta de pesquisa do editor de código
é equivalente. Quando você importa o recurso, o código de construção da imagem é escrito
na seção de importações do
editor de código. Também é possível usar um ID de recurso pessoal como o argumento do construtor ee.Image
.
Receber um ee.Image
de um ee.ImageCollection
A maneira padrão de extrair uma imagem de uma coleção é filtrá-la, com filtros em ordem de especificidade decrescente. Por exemplo, para extrair uma imagem da coleção de refletância de superfície do Sentinel-2:
Editor de código (JavaScript)
var first = ee.ImageCollection('COPERNICUS/S2_SR')
.filterBounds(ee.Geometry.Point(-70.48, 43.3631))
.filterDate('2019-01-01', '2019-12-31')
.sort('CLOUDY_PIXEL_PERCENTAGE')
.first();
Map.centerObject(first, 11);
Map.addLayer(first, {bands: ['B4', 'B3', 'B2'], min: 0, max: 2000}, 'first');
Configuração do Python
Consulte a página
Ambiente Python para informações sobre a API Python e o uso de
geemap
para desenvolvimento interativo.
import ee
import geemap.core as geemap
Colab (Python)
first = (
ee.ImageCollection('COPERNICUS/S2_SR')
.filterBounds(ee.Geometry.Point(-70.48, 43.3631))
.filterDate('2019-01-01', '2019-12-31')
.sort('CLOUDY_PIXEL_PERCENTAGE')
.first()
)
# Define a map centered on southern Maine.
m = geemap.Map(center=[43.7516, -70.8155], zoom=11)
# Add the image layer to the map and display it.
m.add_layer(
first, {'bands': ['B4', 'B3', 'B2'], 'min': 0, 'max': 2000}, 'first'
)
display(m)
A classificação é após os filtros. Evite classificar toda a coleção.
Imagens de GeoTIFFs do Cloud
É possível usar ee.Image.loadGeoTIFF()
para carregar imagens de
GeoTIFFs otimizados para a nuvem no Google Cloud Storage.
Por exemplo, o conjunto de dados público da Landsat hospedado no Google Cloud contém este GeoTIFF, correspondente à banda 5 de uma cena da Landsat 8. É possível carregar essa imagem do
Cloud Storage usando ee.Image.loadGeoTIFF()
:
Editor de código (JavaScript)
var uri = 'gs://gcp-public-data-landsat/LC08/01/001/002/' +
'LC08_L1GT_001002_20160817_20170322_01_T2/' +
'LC08_L1GT_001002_20160817_20170322_01_T2_B5.TIF';
var cloudImage = ee.Image.loadGeoTIFF(uri);
print(cloudImage);
Configuração do Python
Consulte a página
Ambiente Python para informações sobre a API Python e o uso de
geemap
para desenvolvimento interativo.
import ee
import geemap.core as geemap
Colab (Python)
uri = (
'gs://gcp-public-data-landsat/LC08/01/001/002/'
+ 'LC08_L1GT_001002_20160817_20170322_01_T2/'
+ 'LC08_L1GT_001002_20160817_20170322_01_T2_B5.TIF'
)
cloud_image = ee.Image.loadGeoTIFF(uri)
display(cloud_image)
Se você quiser recarregar um GeoTIFF otimizado para a nuvem que foi exportado do Earth Engine para o Cloud Storage, defina cloudOptimized
como true, conforme descrito aqui.
Imagens de matrizes do Zarr v2
É possível usar ee.Image.loadZarrV2Array()
para carregar uma imagem de um vetor do Zarr v2 no Google Cloud Storage. Por exemplo, o conjunto de dados público ERA5 hospedado no Google Cloud contém esta matriz Zarr v2, que corresponde a metros de água que evaporaram da superfície da Terra. É possível carregar
essa matriz do Cloud Storage usando ee.Image.loadZarrV2Array()
:
Editor de código (JavaScript)
var timeStart = 1000000;
var timeEnd = 1000010;
var zarrV2ArrayImage = ee.Image.loadZarrV2Array({
uri:
'gs://gcp-public-data-arco-era5/ar/full_37-1h-0p25deg-chunk-1.zarr-v3/evaporation/.zarray',
proj: 'EPSG:4326',
starts: [timeStart],
ends: [timeEnd]
});
print(zarrV2ArrayImage);
Map.addLayer(zarrV2ArrayImage, {min: -0.0001, max: 0.00005}, 'Evaporation');
Configuração do Python
Consulte a página
Ambiente Python para informações sobre a API Python e o uso de
geemap
para desenvolvimento interativo.
import ee
import geemap.core as geemap
Colab (Python)
time_start = 1000000
time_end = 1000010
zarr_v2_array_image = ee.Image.loadZarrV2Array(
uri='gs://gcp-public-data-arco-era5/ar/full_37-1h-0p25deg-chunk-1.zarr-v3/evaporation/.zarray',
proj='EPSG:4326',
starts=[time_start],
ends=[time_end],
)
display(zarr_v2_array_image)
m.add_layer(
zarr_v2_array_image, {'min': -0.0001, 'max': 0.00005}, 'Evaporation'
)
m
Imagens constantes
Além de carregar imagens por ID, você também pode criar imagens com base em constantes, listas ou outros objetos adequados do Earth Engine. O exemplo a seguir ilustra
métodos para criar imagens, receber subconjuntos de bandas e manipular bandas:
Editor de código (JavaScript)
// Create a constant image.
var image1 = ee.Image(1);
print(image1);
// Concatenate two images into one multi-band image.
var image2 = ee.Image(2);
var image3 = ee.Image.cat([image1, image2]);
print(image3);
// Create a multi-band image from a list of constants.
var multiband = ee.Image([1, 2, 3]);
print(multiband);
// Select and (optionally) rename bands.
var renamed = multiband.select(
['constant', 'constant_1', 'constant_2'], // old names
['band1', 'band2', 'band3'] // new names
);
print(renamed);
// Add bands to an image.
var image4 = image3.addBands(ee.Image(42));
print(image4);
Configuração do Python
Consulte a página
Ambiente Python para informações sobre a API Python e o uso de
geemap
para desenvolvimento interativo.
import ee
import geemap.core as geemap
Colab (Python)
# Create a constant image.
image_1 = ee.Image(1)
display(image_1)
# Concatenate two images into one multi-band image.
image_2 = ee.Image(2)
image_3 = ee.Image.cat([image_1, image_2])
display(image_3)
# Create a multi-band image from a list of constants.
multiband = ee.Image([1, 2, 3])
display(multiband)
# Select and (optionally) rename bands.
renamed = multiband.select(
['constant', 'constant_1', 'constant_2'], # old names
['band1', 'band2', 'band3'], # new names
)
display(renamed)
# Add bands to an image.
image_4 = image_3.addBands(ee.Image(42))
display(image_4)
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-07-25 UTC.
[null,null,["Última atualização 2025-07-25 UTC."],[[["\u003cp\u003eIn Earth Engine, raster data is represented as \u003ccode\u003eImage\u003c/code\u003e objects, which can be created by loading existing assets or by defining them with constant values.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eImage\u003c/code\u003e objects can be created from Earth Engine assets, \u003ccode\u003eImageCollection\u003c/code\u003e objects, and Cloud Optimized GeoTIFFs (COG) stored in Google Cloud Storage.\u003c/p\u003e\n"],["\u003cp\u003eImages in Earth Engine are composed of bands, each with its own data type, scale, mask, and projection, and images can be manipulated using methods such as \u003ccode\u003eselect\u003c/code\u003e, \u003ccode\u003eaddBands\u003c/code\u003e, and \u003ccode\u003ecat\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eImageCollection\u003c/code\u003e objects can be filtered and sorted to retrieve specific images, and \u003ccode\u003eee.Image.loadGeoTIFF()\u003c/code\u003e is used to load images from Cloud Optimized GeoTIFFs in Cloud Storage.\u003c/p\u003e\n"],["\u003cp\u003eConstant images can be created from numerical values, lists of values, and other suitable Earth Engine objects, allowing for flexible image manipulation and analysis.\u003c/p\u003e\n"]]],[],null,["# Image Overview\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| [Run in Google Colab](https://colab.research.google.com/github/google/earthengine-community/blob/master/guides/linked/generated/image_overview.ipynb) | [View source on GitHub](https://github.com/google/earthengine-community/blob/master/guides/linked/generated/image_overview.ipynb) |\n\nAs mentioned in the [Get Started](/earth-engine/guides/getstarted#earth-engine-data-structures)\ndoc, raster data are represented as `Image` objects in Earth Engine. Images are\ncomposed of one or more bands and each band has its own name, data type, scale, mask\nand projection. Each image has metadata stored as a set of properties.\n\n`ee.Image` constructor\n----------------------\n\nImages can be loaded by pasting an Earth Engine asset ID into the `ee.Image`\nconstructor. You can find image IDs in the [data catalog](/earth-engine/datasets).\nFor example, to a digial elevation model ([NASADEM](/earth-engine/datasets/catalog/NASA_NASADEM_HGT_001)):\n\n### Code Editor (JavaScript)\n\n```javascript\nvar loadedImage = ee.Image('NASA/NASADEM_HGT/001');\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\nloaded_image = ee.Image('NASA/NASADEM_HGT/001')\n```\n\n\nNote that finding an image through\n[the Code Editor search tool](/earth-engine/guides/playground#search-tool)\nis equivalent. When you import the asset, the image construction code is written\nfor you in the [imports section of the\nCode Editor](/earth-engine/guides/playground#imports). You can also use a personal\n[asset ID](/earth-engine/guides/manage_assets#asset_id) as the argument to the\n`ee.Image` constructor.\n\nGet an `ee.Image` from an `ee.ImageCollection`\n----------------------------------------------\n\n\nThe standard way to get an image out of a collection is to filter the collection, with\nfilters in order of decreasing specificity. For example, to get an image out of the\n[Sentinel-2 surface reflectance collection](/earth-engine/datasets/catalog/COPERNICUS_S2_SR):\n\n### Code Editor (JavaScript)\n\n```javascript\nvar first = ee.ImageCollection('COPERNICUS/S2_SR')\n .filterBounds(ee.Geometry.Point(-70.48, 43.3631))\n .filterDate('2019-01-01', '2019-12-31')\n .sort('CLOUDY_PIXEL_PERCENTAGE')\n .first();\nMap.centerObject(first, 11);\nMap.addLayer(first, {bands: ['B4', 'B3', 'B2'], min: 0, max: 2000}, 'first');\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\nfirst = (\n ee.ImageCollection('COPERNICUS/S2_SR')\n .filterBounds(ee.Geometry.Point(-70.48, 43.3631))\n .filterDate('2019-01-01', '2019-12-31')\n .sort('CLOUDY_PIXEL_PERCENTAGE')\n .first()\n)\n\n# Define a map centered on southern Maine.\nm = geemap.Map(center=[43.7516, -70.8155], zoom=11)\n\n# Add the image layer to the map and display it.\nm.add_layer(\n first, {'bands': ['B4', 'B3', 'B2'], 'min': 0, 'max': 2000}, 'first'\n)\ndisplay(m)\n```\n\n\nNote that the sort is *after* the filters. Avoid sorting the entire collection.\n\nImages from Cloud GeoTIFFs\n--------------------------\n\n\nYou can use `ee.Image.loadGeoTIFF()` to load images from\n[Cloud Optimized\nGeoTIFFs](https://github.com/cogeotiff/cog-spec/blob/master/spec.md) in [Google Cloud Storage](https://cloud.google.com/storage).\nFor example, the\n[public\nLandsat dataset](https://console.cloud.google.com/marketplace/details/usgs-public-data/landast) hosted in Google Cloud contains\n[this\nGeoTIFF](https://console.cloud.google.com/storage/browser/_details/gcp-public-data-landsat/LC08/01/001/002/LC08_L1GT_001002_20160817_20170322_01_T2/LC08_L1GT_001002_20160817_20170322_01_T2_B5.TIF), corresponding to band 5 from a Landsat 8 scene. You can load this image from\nCloud Storage using `ee.Image.loadGeoTIFF()`:\n\n### Code Editor (JavaScript)\n\n```javascript\nvar uri = 'gs://gcp-public-data-landsat/LC08/01/001/002/' +\n 'LC08_L1GT_001002_20160817_20170322_01_T2/' +\n 'LC08_L1GT_001002_20160817_20170322_01_T2_B5.TIF';\nvar cloudImage = ee.Image.loadGeoTIFF(uri);\nprint(cloudImage);\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\nuri = (\n 'gs://gcp-public-data-landsat/LC08/01/001/002/'\n + 'LC08_L1GT_001002_20160817_20170322_01_T2/'\n + 'LC08_L1GT_001002_20160817_20170322_01_T2_B5.TIF'\n)\ncloud_image = ee.Image.loadGeoTIFF(uri)\ndisplay(cloud_image)\n```\n\n\nNote that if you want to reload a Cloud Optimized GeoTIFF that you\n[export from Earth Engine to\nCloud Storage](/earth-engine/guides/exporting#to-cloud-storage), when you do the export, set\n`cloudOptimized` to **true** as\ndescribed [here](/earth-engine/guides/exporting#configuration-parameters).\n\nImages from Zarr v2 arrays\n--------------------------\n\n\nYou can use `ee.Image.loadZarrV2Array()` to load an image from a\n[Zarr v2 array](https://zarr-specs.readthedocs.io/en/latest/v2/v2.0.html) in\n[Google Cloud Storage](https://cloud.google.com/storage). For example, the public\nERA5 dataset hosted in Google Cloud contains\n[this Zarr v2 array](https://console.cloud.google.com/storage/browser/_details/gcp-public-data-arco-era5/ar/full_37-1h-0p25deg-chunk-1.zarr-v3/evaporation/.zarray),\ncorresponding to meters of water that has evaporated from the Earth's surface. You can load\nthis array from Cloud Storage using `ee.Image.loadZarrV2Array()`:\n\n### Code Editor (JavaScript)\n\n```javascript\nvar timeStart = 1000000;\nvar timeEnd = 1000010;\nvar zarrV2ArrayImage = ee.Image.loadZarrV2Array({\n uri:\n 'gs://gcp-public-data-arco-era5/ar/full_37-1h-0p25deg-chunk-1.zarr-v3/evaporation/.zarray',\n proj: 'EPSG:4326',\n starts: [timeStart],\n ends: [timeEnd]\n});\nprint(zarrV2ArrayImage);\nMap.addLayer(zarrV2ArrayImage, {min: -0.0001, max: 0.00005}, 'Evaporation');\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\ntime_start = 1000000\ntime_end = 1000010\nzarr_v2_array_image = ee.Image.loadZarrV2Array(\n uri='gs://gcp-public-data-arco-era5/ar/full_37-1h-0p25deg-chunk-1.zarr-v3/evaporation/.zarray',\n proj='EPSG:4326',\n starts=[time_start],\n ends=[time_end],\n)\n\ndisplay(zarr_v2_array_image)\n\nm.add_layer(\n zarr_v2_array_image, {'min': -0.0001, 'max': 0.00005}, 'Evaporation'\n)\nm\n```\n\nConstant images\n---------------\n\nIn addition to loading images by ID, you can also create images\nfrom constants, lists or other suitable Earth Engine objects. The following illustrates\nmethods for creating images, getting band subsets, and manipulating bands:\n\n### Code Editor (JavaScript)\n\n```javascript\n// Create a constant image.\nvar image1 = ee.Image(1);\nprint(image1);\n\n// Concatenate two images into one multi-band image.\nvar image2 = ee.Image(2);\nvar image3 = ee.Image.cat([image1, image2]);\nprint(image3);\n\n// Create a multi-band image from a list of constants.\nvar multiband = ee.Image([1, 2, 3]);\nprint(multiband);\n\n// Select and (optionally) rename bands.\nvar renamed = multiband.select(\n ['constant', 'constant_1', 'constant_2'], // old names\n ['band1', 'band2', 'band3'] // new names\n);\nprint(renamed);\n\n// Add bands to an image.\nvar image4 = image3.addBands(ee.Image(42));\nprint(image4);\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\n# Create a constant image.\nimage_1 = ee.Image(1)\ndisplay(image_1)\n\n# Concatenate two images into one multi-band image.\nimage_2 = ee.Image(2)\nimage_3 = ee.Image.cat([image_1, image_2])\ndisplay(image_3)\n\n# Create a multi-band image from a list of constants.\nmultiband = ee.Image([1, 2, 3])\ndisplay(multiband)\n\n# Select and (optionally) rename bands.\nrenamed = multiband.select(\n ['constant', 'constant_1', 'constant_2'], # old names\n ['band1', 'band2', 'band3'], # new names\n)\ndisplay(renamed)\n\n# Add bands to an image.\nimage_4 = image_3.addBands(ee.Image(42))\ndisplay(image_4)\n```"]]