Skip to content

Gowsiga-45/google-earth-engine-python-tutorials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌍 Google Earth Engine Python Tutorials

Overview

This repository contains my hands-on implementations of Google Earth Engine (Python API) workflows for remote sensing and geospatial analysis.

The notebooks demonstrate practical applications of cloud-based geospatial processing using satellite imagery and open geospatial datasets.


Topics Covered

  • Google Earth Engine (Python API)
  • Geemap
  • Landsat 8
  • Sentinel-1
  • Sentinel-2
  • Image Collections
  • NDVI & EVI
  • Surface Water Mapping
  • Agricultural Mapping
  • Drought Monitoring
  • Supervised Classification (Random Forest)
  • Unsupervised Classification (K-Means)
  • Accuracy Assessment
  • Data Visualization

Repository Structure

google-earth-engine-python-tutorials/

├── notebooks/
├── images/
├── data/
├── assets/
├── requirements.txt
└── README.md

Learning Objectives


📒 Available Notebooks

Notebook 01 – Google Earth Engine Basics

Overview

Introduction to Google Earth Engine using the Python API. Learn how to authenticate, visualize satellite imagery, compute vegetation indices, and export raster datasets.

Topics Covered

  • Google Earth Engine authentication and initialization
  • Interactive mapping with Geemap
  • SRTM Digital Elevation Model (DEM)
  • Area of Interest (AOI)
  • Landsat 8 imagery
  • NDVI calculation
  • EVI calculation
  • Exporting GeoTIFFs

Notebook

notebooks/01_GEE_Basics_Python.ipynb

Outputs

DEM

NDVI

EVI


Notebook 02 – Image Collections & Cloud Filtering

Overview

Learn how to work with Landsat 8 ImageCollections by filtering satellite imagery based on location, acquisition date, and cloud cover, and create composite images for analysis.

Topics Covered

  • Landsat 8 ImageCollections
  • Spatial filtering (AOI)
  • Date filtering
  • Cloud cover filtering
  • Image metadata
  • Median Composite
  • Mosaic
  • Median vs. Mosaic comparison

Notebook

notebooks/02_Image_Collections_and_Cloud_Filtering.ipynb

Outputs

Median

Mosaic

Comparison


Notebook 03 — Cloud Masking & Image Preprocessing

Notebook: 03_Cloud_Masking_&_Image_Preprocessing.ipynb

This notebook focuses on preprocessing Landsat 8 Collection 2 Level-2 imagery in Google Earth Engine before performing further remote-sensing analysis.

Topics Covered

  • Loading Landsat 8 Collection 2 Level-2 imagery
  • Filtering images by date and area of interest (AOI)
  • Filtering scenes using CLOUD_COVER
  • Understanding the QA_PIXEL quality-assurance band
  • Detecting cloud and cloud-shadow pixels using bitwise operations
  • Creating a cloud-masking function
  • Applying the cloud mask to an ImageCollection
  • Applying Landsat Collection 2 scale factors and offsets
  • Creating median composites from cloud-masked imagery
  • Comparing imagery before and after cloud masking
  • Calculating NDVI using preprocessed imagery

☁️ Cloud Masking

Cloud filtering and cloud masking serve different purposes.

  • Cloud filtering removes entire satellite scenes with high overall cloud cover.
  • Cloud masking identifies cloudy pixels within the retained scenes and masks those pixels from further analysis.

The Landsat QA_PIXEL band is used to identify unwanted pixels such as clouds and cloud shadows.

Landsat Collection 2 Scale Factors

Landsat Collection 2 Level-2 data are stored as scaled integer values. Scale factors and offsets are applied to convert the stored values into physically meaningful values.

Product Scale Factor Offset
Surface Reflectance (SR_B*) 0.0000275 -0.2
Surface Temperature (ST_B*) 0.00341802 149.0

General conversion:

Physical Value = DN × Scale Factor + Offset

🛰️ Before Cloud Masking

Before Cloud Masking

☁️ After Cloud Masking

After Cloud Masking

🔍 Before vs After Comparison

Cloud Mask Comparison

🌿 Cloud-Masked NDVI

Cloud Masked NDVI

Key Learning Outcome

This notebook demonstrates why satellite imagery should be preprocessed before spectral-index calculation and other remote-sensing analyses. Cloud filtering reduces the number of highly cloudy scenes, while pixel-level cloud masking removes contaminated observations from the remaining imagery.

Technologies

  • Python
  • Google Earth Engine
  • Geemap
  • NumPy
  • Pandas
  • Matplotlib
  • GeoPandas
  • Rasterio

Repository Status

🚧 This repository is currently under development.

New notebooks will be added progressively, covering each topic in detail with explanations, code, and visual outputs.


License

This project is licensed under the MIT License.

About

Hands-on Google Earth Engine (Python API) tutorials for remote sensing and geospatial analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages