working with satellite imagery

exploring sentinel 2, landsat 8 and planet

In this first exercise we will explore sentinel 2 imagery. copy the code below and fix the ??

// import the images
var img2015 = ee.Image("COPERNICUS/S2/20151208T033242_20151208T033323_T48PVT");
var img2021 = ee.Image("COPERNICUS/S2/20210704T031539_20210704T032623_T48PVT");

// display the images
Map.addLayer(img2015,{min:0,max:3000,bands:"B4,B3,B2"},"image");
Map.addLayer(img2021,{min:0,max:3000,bands:"??,??,??"},"image ");

now we calculate the NDVI. try to fix the ?? in the script

// calculate the ndvi
var ndvi = img2021.normalizedDifference(["??","??"])

// display the ndvi
Map.addLayer(ndvi,{min:??,max:??,palette:"??,??,??,??"},"ndvi")

Now we import imagery from landsat

// import imagery
var img1988 = ee.Image("LANDSAT/LT05/C02/T1_L2/LT05_126052_19880309").multiply(0.0000275).add(-0.2);
var img2021 = ee.Image("LANDSAT/LC08/C02/T1_L2/LC08_126052_20210304").multiply(0.0000275).add(-0.2);

// display imagery
Map.addLayer(img1988,{min:0,max:0.3,bands:"??,??,??"},"image");
Map.addLayer(img2021,{min:0,max:0.3,bands:"??,??,??"},"image");

What year as the imagery taken? and what sensor was the imagery taken with?

now we calculate the NDVI, try to fill out the ??

var ndvi1988 = img1988.normalizedDifference(["SR_B4","SR_B3"])
var ndvi2021 = img2021.normalizedDifference(["??","??"])

Map.addLayer(ndvi1988,{min:-0.25,max:0.8,palette:"blue,white,green,darkgreen"},"ndvi")
Map.addLayer(ndvi2021,{min:-0.25,max:0.8,palette:"blue,white,green,darkgreen"},"ndvi")

now we will look at different resolution data. try to fix the ?? in the script

var viirs = ee.Image("NOAA/VIIRS/001/VNP13A1/2020_12_26").select("NDVI").multiply(0.0001);
print(viirs);
Map.addLayer(viirs,{min:-0.2,max:1,palette:"??"},"viirs");
 
var l8 = ee.Image("LANDSAT/LC08/C02/T1_L2/LC08_126051_20201230").multiply(0.0000275).add(-0.2);;
var l8ndvi = l8.normalizedDifference(["SR_B5","SR_B4"]);
Map.addLayer(l8ndvi,{min:-0.2,max:1,palette:"??"},"landsat 8 ndvi");

 
var s2 = ee.Image("COPERNICUS/S2/20201226T032139_20201226T033352_T48PWV").multiply(0.0001);
var s2ndvi = s2.normalizedDifference(["B8","B4"]);
Map.addLayer(s2ndvi,{min:-0.2,max:1,palette:"??"},"sentinel 2 ndvi");
 
var planet = ee.Image("projects/cemis-camp/assets/Planet/202012")
var planetndvi = planet.normalizedDifference(["b4","b2"])
Map.addLayer(planetndvi,{min:-0.2,max:1,palette:"??"},"planet 2 ndvi");

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s