Springe direkt zu Inhalt

Self Assessment

Here, you can check the knowledge you gained during the second chapter.

Please, work through the following exercises.

You can verify your results by expanding the corresponding 'Spoiler'-boxes at the bottom of this page, which will contain a correct solution.

 

2.1: Find the Mistakes

Find the mistakes in the following piece of code and correct them.

ndvi = image.NormalizedDifference[('NIR, RED'])

 

2.2: Difference Image

What is a difference image, and why is it so helpful when working with spectral indices and remote sensing in general?

 

2.3 Functions

Write a function that adds the NDVI to every image of an ImageCollection.

 

2.4 Classification

Classify and NDVI-Image into 4 meaningful classes and display it in the map panel.

 

 

Now it is your turn!

Think of a research question related to a spectral index of your choice and monitor its trend for a research area and time period of your own choice.

This could for example be:

- the occurence of healthy vegetation in the course of a year using the NDVI,

- the effects of a drought on healthy vegetation using the NDVI,

- the effects of a wildfire using the NBR,

- ...

 

Support your research by meaningful data, maps, analyses and charts, as learned in this chapter.

In case you get stuck, you can always use the code of Chapter 2.4 'Comparison and Analysis of the Results' as reference.

 

 

The corrected parts are marked in bold.

var ndvi = image.normalizedDifference(['NIR', 'RED']);

A difference image is the the image obtained by calculating the difference in each pixel of two or more images. It is an essentially useful technique to analyse changes between these images, as they are made easily identifiable both by eye and by pixel value.

var addNDVI = function(image) {
  var ndvi = image.normalizedDifference(['NIR', 'RED']);
  return image.addBands(ndvi);
};

One possible solution:

var thresholds_ndvi = ee.Image([-0.1, 0.2, 0.5, 1]); //no vegetation; sparse vegetation; light vegetation; high vegetation
var classified_ndvi = image.select('NDVI').gt(thresholds_ndvi).reduce('sum').toInt();

var classifiedParams = {min: 0, max: 4, palette: ['blue', 'white', 'LimeGreen', 'DarkGreen']};
Map.addLayer(classified, classifiedParams, 'Classified');