Display Natural Color, Color Infrared (Vegetation), Healthy Vegetation, and Vegetation Analysis Maps in a Single Screen using Simple Codes in Google Earth Engine – Study Area (Ethiopia)

Undoubtedly, GEE has made a lot things easier. Some of these include: detecting deforestation, classifying land cover, estimating forest biomass and carbon, and mapping the world’s roadless areas, and so on and so forth. The advantage lies in its remarkable computation speed, as processing is outsourced to Google servers. The platform provides a variety of constantly updated data sets, so no download of raw imagery is required. One of GEE’s tools, the Earth Engine Code Editor, is a web-based integrated development environment which facilitates developing complex geospatial workflows.

Today’s tutorial is about exploring one of the most powerful and interesting tasks that GEE can do–computing and displaying multiple images in a single screen. In this tutorial, we will learn how to display Natural Color, Color Infrared (Vegetation), Healthy Vegetation, and Vegetation Analysis Maps in a Single Screen using Simple Codes in Google Earth Engine. You may want to display other maps like False Color (Urban), Agriculture, Land/Water, and other maps using different band combination. Some of the popular band combinations are included below:

Natural Color4 3 2
False Color (urban)7 6 4
Color Infrared (vegetation)5 4 3
Agriculture6 5 2
Healthy Vegetation5 6 2
Land/Water5 6 4
Natural With Atmospheric Removal7 5 3
Shortwave Infrared7 5 4
Vegetation Analysis6 5 4

Before jumping into the code let’s learn about the Landsat 8 bands and band combinations.

USGS Landsat 8 Collection 1 Tier 1 TOA Reflectance

Landsat 8 Collection 1 Tier 1 is calibrated top-of-atmosphere (TOA) reflectance. The Calibration coefficients are extracted from the image metadata. See Chander et al. (2009) for details on the TOA computation.

Common Landsat Band Combinations

Individual bands can be composited in a Red, Green, Blue (RGB) combination in order to visualize the data in color. Each band of a multispectral image can be displayed one band at a time as a grayscale image, or as a combination of three bands at a time as a color composite image. There are many different combinations that can be made, and each has their own advantages and disadvantages. When we combine these three images, the result is a color image with each pixel’s color determined by combination of RGB of different brightness.

Why Band Combintions?

Band combinations are selected for a number of reasons and it is helpful to understand the spectral reflectance profiles of features you are interested in studying. For example in the NIR false color composite shown above healthy vegetation appears bright red as they reflect more near infrared than green. Another common combination uses the shortwave infrared (shown as red), the near infrared (green), and the green visible band (shown as blue). In this false color composite vegetation appear bright green, bare ground appears reddish and snow appears bright blue. Though there are many possible combinations of wavelength bands, the table to the left is a list of some that are commonly used. Some of the most common and popular combinations are listed above.

Band Combination example. Source: Humboldt State Geospatial Online

Read more about these band combinations in Earth Observatory and Humboldt State Geospatial Online websites.

Landsat Spectral Band Information

Landsat images are composed of seven different bands, each representing a different portion of the electromagnetic spectrum. In order to work with Landsat band combinations (RGB composites of three bands) first we must understand the specifications of each band.

Band 1 (0.45-0.52 μm, blue-green)
This short wavelength of light penetrates better than the other bands, and it is often the band of choice for monitoring aquatic ecosystems (mapping sediment in water, coral reef habitats, etc.). Unfortunately this is the “noisiest” of the Landsat bands since it is most susceptible to atmospheric scatter.

Band 2 (0.52-0.60 μm, green)
This has similar qualities to band 1 but not as extreme. The band was selected because it matches the wavelength for the green we see when looking at vegetation.

Band 3 (0.63-0.69 μm, red)
Since vegetation absorbs nearly all red light (it is sometimes called the chlorophyll absorption band) this band can be useful for distinguishing between vegetation and soil and in monitoring vegetation health.

Band 4 (0.76-0.90 μm, near infrared)
Since water absorbs nearly all light at this wavelength water bodies appear very dark. This contrasts with bright reflectance for soil and vegetation so it is a good band for defining the water/land interface.

Band 5 (1.55-1.75 μm, mid-infrared)
This band is very sensitive to moisture and is therefore used to monitor vegetation and soil moisture. It is also good at differentiating between clouds and snow.

Band 6 (10.40-12.50 μm, thermal infrared)
This is a thermal band, which means it can be used to measure surface temperature. Band 6 is primarily used for geological applications but it is sometime used to measure plant heat stress. This is also used to differentiate clouds from bright soils as clouds tend to be very cold. The resolution of band 6 (60m) is half of the other bands.

Band 7 (2.08-2.35 μm mid-infrared)
This band is also used for vegetation moisture although generally band 5 is preferred for that application, as well as for soil and geology mapping.

Here is the code:

// Load Landsat 8 images
var L8 = ee.ImageCollection("LANDSAT/LC08/C01/T1_TOA")
// Define yout study area
var countries = ee.FeatureCollection("ft:1tdSwUL7MVpOauSgRzqVTOwdfy17KDbw-1d9omPw")
var country_name = ['Ethiopia']
var study_area = countries.filter(ee.Filter.inList('Country', country_name));
Map.addLayer(study_area,{},"Study Area"+country_name);
Map.centerObject(study_area,7);  //Zoom to Study are

/*Configure maps, link them in a grid*/
// Create a map for each visualization option..
var MAP_PARAMS = {
  'Natural Color Map (B3/B2/B1)': ['B3', 'B2', 'B1'],
  'Color Infrared (Vegetation) (B5/B4/B3)': ['B5', 'B4', 'B3'],
  'Heathy Vegetation (B5/B6/B2)': ['B5', 'B6', 'B2'],
  'Vegetation Analysis (B6/B5/B4)': ['B6', 'B5', 'B4']

// Shared visualization parameters for the images.
function getVisualization(bands) {
  return {gamma: 1.3, min: 0, max: 0.3, bands: bands};

/*Configure maps, link them in a grid*/
// Create a map for each visualization option.
var maps = [];
Object.keys(MAP_PARAMS).forEach(function(name) {
  var map = ui.Map();
  map.addLayer(image, getVisualization(MAP_PARAMS[name]), name);
var linker = ui.Map.Linker(maps);
// Enable zooming on the top-left map.
maps[0].setControlVisibility({zoomControl: true});
// Show the scale (e.g. '500m') on the bottom-right map.
maps[3].setControlVisibility({scaleControl: true});
// Create a grid of maps.
var mapGrid = ui.Panel(
      ui.Panel([maps[0], maps[1]], null, {stretch: 'both'}),
      ui.Panel([maps[2], maps[3]], null, {stretch: 'both'})
    ui.Panel.Layout.Flow('horizontal'), {stretch: 'both'});

// Center the map 

maps[0].setCenter(39.4, 8.3, 6.5);

/* * Add a title and initialize*/
// Create a title.
var title = ui.Label('Display Natural Color, color Infrared (Vegetation), Healthy Vegetation, and Vegetation Analysis Maps', {
  stretch: 'horizontal',
  textAlign: 'center',
  fontWeight: 'bold',
  fontSize: '24px'
// Add the maps and title to the ui.root.
ui.root.widgets().reset([title, mapGrid]);

Back to Google Earth Engine Home-Page

4 thoughts on “Display Natural Color, Color Infrared (Vegetation), Healthy Vegetation, and Vegetation Analysis Maps in a Single Screen using Simple Codes in Google Earth Engine – Study Area (Ethiopia)”

  1. Spectral reflectance curve of vegetation ,soil and water . ..help me to understand the spectral reflectance of differnt land covers

  2. Sumanta Chatterjee

    when I ran the code it showed error like below:

    Geometry.centroid, argument ‘maxError’: Invalid type. Expected: ErrorMargin. Actual: Float.

  3. Hello sir, i read and execute mostly codes,Sir, you are really doing great job,
    sir, i have a question that how can we calculate yield from the satellite data any suggestion ?

Leave a Reply

%d bloggers like this: