exploring sentinel-2 imagery

using Google Earth Engine

Question 1:

copy the code below into the earth engine code editor and hit run

// import image
var image = ee.Image("COPERNICUS/S2/20160416T031602_20160416T032714_T48PVT");

// center on image
Map.centerObject(image);
// add image to layer
Map.addLayer(image,{min:0,max:3000,bands:"B4,B3,B2"},"image");

Try to answer the following questions

  1. When was the satellite image taken?
  2. what is the cloud cover percentage on the image?
  3. What are B4, B3 and B2?
  4. What is the spatial resolution of the image?

Question 2

copy the code below into the the earth engine code editor and hit run

// import image
var image1 = ee.Image("COPERNICUS/S2/20160416T031602_20160416T032714_T48PVT");
var image2 = ee.Image("COPERNICUS/S2/20210331T031541_20210331T032710_T48PVT")
// center on image
Map.centerObject(image2);
// add image to layer
Map.addLayer(image1,{min:0,max:3000,bands:"B4,B3,B2"},"image 1");
Map.addLayer(image2,{min:0,max:3000,bands:"B4,B3,B2"},"image 2");

try to answer the following questions

  1. When was image 2 taken?
  2. What differences can we observe on the image?

Question 3:

copy the code below into the the earth engine code editor and hit run

// import image
var image = ee.Image("COPERNICUS/S2/20210331T031541_20210331T032710_T48PVT")

// center on image
Map.centerObject(image);

// add image to layer
Map.addLayer(image,{min:0,max:3000,bands:"B4,B3,B2"},"True color");
Map.addLayer(image,{min:0,max:6000,bands:"B12,B8,B3"},"False color");

try to answer the following question

  1. What is the difference between image 1 and image 2?

Question 4:

copy the code below into the the earth engine code editor and hit run

// import image
var image1 = ee.Image("COPERNICUS/S2/20151208T033242_20151208T033323_T48PWV")
var image2 = ee.Image("COPERNICUS/S2/20211101T031859_20211101T032530_T48PWV")

// center on image
Map.centerObject(image1);

// add image to layer
Map.addLayer(image1,{min:0,max:3000,bands:"B4,B3,B2"},"2015");
Map.addLayer(image2,{min:0,max:3000,bands:"B4,B3,B2"},"2021");

try answering the following question:

  1. what is the dominant change between 2015 and 2021?

Question 5:

copy the code below into the the earth engine code editor and hit run

// import image
var image = ee.Image("COPERNICUS/S2/20191003T031549_20191003T032936_T48PWU");

// calculate the ndwi
var ndwi = image.normalizedDifference(["B3","B8"]);

// center on image
Map.centerObject(image);

// add image to layer
Map.addLayer(image,{min:0,max:3000,bands:"B4,B3,B2"},"oct 2019");
Map.addLayer(ndwi,{min:0,max:1,palette:"white,blue,darkblue"},"ndwi");

try answering the following question:

  1. what is the ndwi?

Question 6:

copy the code below into the the earth engine code editor and hit run

var img = ee.Image("COPERNICUS/S2/20181102T031901_20181102T032732_T48PVT");

// calculate the ndbi
var ndbi = img.normalizedDifference(["B12","B8"]);

Map.addLayer(img,{min:0,max:3000,bands:"B4,B3,B2"},"sentinel 2 image");
Map.addLayer(ndbi,{min:-0.25,max:0.250,palette:"white,gray,black,purple"},"ndbi");

try answering the following question:

  1. what is the ndbi?

Leave a Reply