Landsat 8 - Collection 2
Tutorial created by **David Montero Loaiza**: GitHub | Twitter
GitHub Repo: https://github.com/davemlz/eemont
PyPI link: https://pypi.org/project/eemont/
Conda-forge: https://anaconda.org/conda-forge/eemont
Documentation: https://eemont.readthedocs.io/
More tutorials: https://github.com/davemlz/eemont/tree/master/docs/tutorials
Let’s start!
If required, please uncomment:
[1]:
#!pip install eemont
#!pip install geemap
Import the required packages.
[2]:
import ee, eemont, geemap
import geemap.colormaps as cm
Authenticate and Initialize Earth Engine and geemap.
[3]:
Map = geemap.Map()
Let’s define a point of interest:
[4]:
poi = ee.Geometry.BBoxFromQuery("Lago Tana",user_agent = "eemont-tutorial-025")
Landsat 8, Collection 2, Pre-processing and Processing
eemont (v0.2.4) now supports pre-processing and processing of the Collection 2 of Landsat 8 (and Landsat 7)!:
[5]:
L8 = (ee.ImageCollection("LANDSAT/LC08/C02/T1_L2")
.filterBounds(poi)
.filterDate("2019-01-01","2021-01-01")
.preprocess()
.spectralIndices(["GNDVI","MNDWI"])
.median())
Let’s visualize everything using geemap (and also container emulation methods!):
[6]:
Map = geemap.Map()
Map.addLayer(L8[[3,2,1]],{"min":0,"max":0.3},"RGB")
Map.addLayer(L8['GNDVI'],{"min":0,"max":1,"palette":cm.palettes.ndvi},"GNDVI")
Map.addLayer(L8['MNDWI'],{"min":0,"max":1,"palette":cm.palettes.ndwi},"MNDWI")
Map.centerObject(poi.centroid(1))
Map