Lesson 1: Digital Image Processing & Vegetation Indices
Digital satellite sensors measure reflectance as integers known as Digital Numbers (DN). To carry out scientific research, DN values must be calibrated into Top of Atmosphere (TOA) reflectance or Surface Reflectance (SR) to adjust for atmospheric scattering effects.
NDVI (Normalized Difference Vegetation Index)
Vegetation indices quantify plant canopy greenness by comparing reflectance in red (absorbed by chlorophyll) and near-infrared (highly reflected by leaf cellular structures) bands.
NDVI = (NIR - Red) / (NIR + Red)
Interpreting NDVI Wavelength Outputs:
- -1.0 to 0.0: Water bodies, clouds, or snow caps (highly reflect visible light relative to NIR).
- 0.0 to 0.15: Barren rock, sand, or concrete pavements.
- 0.2 to 0.4: Shrubs, grasslands, or crops in early development phases.
- 0.6 to 1.0: Dense, healthy tropical rainforest canopies or mature agricultural yields.
Lesson 2: Spatial Databases (PostgreSQL & PostGIS)
Standard databases only support textual or numerical data. PostGIS is a spatial database extension for the open-source **PostgreSQL** relational database. It adds spatial geometry types (Point, LineString, Polygon) and index methods (R-Tree / GIST indexes) allowing rapid query processing of physical coordinate intersections.
Advanced Spatial SQL Query Example
Below is a production-ready spatial SQL script. It identifies all weather monitoring stations situated within a critical 50-kilometer buffer zone surrounding a major hazard zone.
-- Step 1: Create spatial table for weather stations
CREATE TABLE weather_stations (
id SERIAL PRIMARY KEY,
name VARCHAR(100),
geom GEOMETRY(Point, 4326) -- 4326 stands for GCS WGS84
);
-- Step 2: Write a spatial query using ST_DWithin
-- ST_Transform reprojects WGS84 coordinates to UTM zone (e.g. 32644) for accurate meter buffer checking
SELECT ws.id, ws.name,
ST_Distance(ST_Transform(ws.geom, 32644), ST_Transform(h.geom, 32644)) / 1000 AS distance_km
FROM weather_stations ws, hazard_zones h
WHERE h.name = 'Bay of Bengal Cyclone Path'
AND ST_DWithin(ST_Transform(ws.geom, 32644), ST_Transform(h.geom, 32644), 50000); -- 50,000 meters = 50km
Lesson 3: Spatial Interpolation
Spatial Interpolation is the process of estimating values at unmeasured locations using sample coordinates recorded across the study area (e.g. predicting rainfall levels in a town using weather readings from surrounding stations).
Key Interpolation Methodologies:
- Inverse Distance Weighting (IDW): A deterministic method where nearby sample points have a stronger influence on the estimated value than points further away. Highly straightforward, but prone to creating artificial "islands" of high or low values.
- Kriging: A geostatistical method that analyzes the statistical spatial correlation among points. It is highly accurate, providing an estimate of uncertainty alongside the predicted values. Kriging is widely used in soil science, geology, and meteorological studies.
Lesson 4: Python Geopandas Scripting
Python is the standard scripting language for advanced big-data geoprocessing. The **GeoPandas** library extends Pandas to handle spatial dataframes, allowing you to manipulate and analyze vectors directly in code.
import geopandas as gpd
import matplotlib.pyplot as plt
# 1. Load agricultural boundary Shapefile vector layer
gdf = gpd.read_file('assets/data/agri_boundaries.shp')
# 2. Project from GCS (WGS84) to PCS (UTM Zone 44N) for accurate geometric calculations
gdf = gdf.to_crs(epsg=32644)
# 3. Calculate acreage of each land block in hectares (1 hectare = 10,000 sq meters)
gdf['area_hectares'] = gdf['geometry'].area / 10000.0
# 4. Filter plots larger than 50 hectares
large_plots = gdf[gdf['area_hectares'] > 50.0]
# 5. Plot the filtered agricultural vectors
large_plots.plot(column='area_hectares', cmap='YlGn', legend=True)
plt.title("Agricultural Plots > 50 Hectares (UTM 44N)")
plt.savefig('assets/images/agri_map.png', dpi=300)
print("Geoprocessing completed. Area calculated and map generated.")
Lesson 5: Google Earth Engine (GEE) JavaScript API
Google Earth Engine (GEE) is a cloud-based geospatial computing platform. Instead of downloading terabytes of satellite imagery locally, GEE enables you to run high-performance spatial scripts directly on Google's cloud servers.
Sentinel-2 False Color Forest Canopy Script
Copy this JavaScript snippet directly into your Google Earth Engine Code Editor to filter and display cloud-free Sentinel-2 MSI satellite imagery, rendering healthy vegetation in a highly visible false-color infrared combination (NIR-Red-Green bands).
// 1. Define study coordinates (focused on Sunderbans Mangroves)
var studyPoint = ee.Geometry.Point([88.8000, 21.9000]);
// 2. Load Sentinel-2 Level-2A surface reflectance satellite collections
var image = ee.ImageCollection('COPERNICUS/S2_SR_HARMONIZED')
.filterBounds(studyPoint)
.filterDate('2025-01-01', '2025-05-01')
// Pre-filter to keep only cloud-free imagery (less than 10% clouds)
.filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 10))
.median(); // Compile all captures using a median composite
// 3. Set up false-color visualization parameters (B8 = NIR, B4 = Red, B3 = Green)
var visParams = {
bands: ['B8', 'B4', 'B3'],
min: 0,
max: 3000,
gamma: 1.4
};
// 4. Center map view and add image layer to the dashboard console
Map.centerObject(studyPoint, 10);
Map.addLayer(image, visParams, 'False Color Vegetation Map');