ee.Image

ee.Image

The Image Object represents all raster data, for example:

  • Satellite Imagery

  • Digital Elevation Models

  • Sea Surface Temperature datasets

  • Aerosol Measurements

Each Image is composed of one or more Bands, similar to what you would expect with RGB images (Red, Green, Blue bands).

Each Band has its own:

  • name - e.g. B1

  • scale - e.g. 10 m

  • data type - 8 bit

  • mask - 37000 x 37000 px

  • projection - e.g. EPSG 3031

Users can view the properties and metadata of an Image via the Data Catalog or in the Code Editor UI to learn more:

Image Visualisation:

Images can be added individually, for example per image.

Here, we add a Sentinel-2 image:

// Add the image with this Unique ID from the Sentinel-2 collection:
var ee.Image('COPERNICUS/S2_SR/20210126T132929_20210126T132924_T19DEF'  

// Assign RGB Visualisation parameters - i.e. stretch between min/max:
var Vis = {
  min: 1000.0,
  max: 15000,
};

// Tell the Engine what to do with the image - i.e. choose the RGB bands:  
var s2_image_rgb = s2_image.select(['B4', 'B3', 'B2']);

// Add the image/Layer to the Map View, stretch it to the Vis parameters, and label it "S2_Image"
Map.addLayer(s2_image_rgb, Vis, 'S2_Image')

You can see it in action here:

Image Clipping:

Sometimes it's useful to crop an Image to a shape, either to make the output file smaller or for cartographic effect. You can use the Clip method to do this:

ee.Image.clip()

Here we clip the image above with a Circle around Rothera Point:

// Create a circle by drawing a 10000 metre buffer around a point.
var roi = ee.Geometry.Point([-68.124, -67.5679]).buffer(10000);

// Display a clipped version of the image.
Map.addLayer(s2_image_rgb.clip(roi), Vis, 'S2 clipped');

Last updated