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, mask
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); 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);