Image Overview

As mentioned in the Get Started doc, raster data are represented as Image objects in Earth Engine. Images are composed of one or more bands and each band has its own name, data type, scale and projection. Each image has metadata stored as a set of properties.

In addition to loading images from the archive by an image ID, you can also create images from constants, lists or other suitable Earth Engine objects. The following illustrates methods for creating images, getting band subsets, and manipulating bands:

// Create a constant image.
var image1 = ee.Image(1);

// Concatenate two images into one multi-band image.
var image2 = ee.Image(2);
var image3 =[image1, image2]);

// Create a multi-band image from a list of constants.
var multiband = ee.Image([1, 2, 3]);

// Select and (optionally) rename bands.
var renamed =
    ['constant', 'constant_1', 'constant_2'], // old names
    ['band1', 'band2', 'band3']               // new names

// Add bands to an image.
var image4 = image3.addBands(ee.Image(42));

Enviar comentarios sobre…

Google Earth Engine API