This exercise aims to explore the concept of linear (in)dependence in the context of multispectral satellite imagery. You will:
Download multispectral satellite imagery (Red and Near-Infrared bands) using Google Earth Engine (GEE).
Read and process this imagery in Python using libraries like rasterio and numpy.
Calculate an unnormalized vegetation index (Difference Vegetation Index- DVI) and a nor malized vegetation index (Normalized Difference Vegetation Index- NDVI).
Analyze the set of bands {NIR, Red, DVI} and {NIR, Red, NDVI} for linear dependence using the covariance matrix, its determinant, and its eigenvalues/eigenvectors.
Explain the observed differences based on the mathematical properties of the indices and the principles of linear algebra.
The area selected was a one of the most intense wildfire from 2019 on Durango, Dgo. The study area is dominated by conifers of the genera Pinus, Juniperus and Cupressus, as well as grasslands and shrublands dominated by Acacia and Prosopis species (see Figure 2.1). The climate ranges from semi-dry temperate to semi-cold subhumid and subhumid. Altitude ranges from 800 to 3,200 m.
# Convert to sf for Leaflet compatibility
cpc_sf <- st_as_sf(cpc)
# Get extent (bounding box) of the polygon using terra functions
extent_cpc <- ext(cpc)
# Extract min/max long adn lat for view on leaflet
lng1 <- xmin(extent_cpc)
lng2 <- xmax(extent_cpc)
lat1 <- ymin(extent_cpc)
lat2 <- ymax(extent_cpc)
# Create leaflet dynamic map
leaflet() %>%
addProviderTiles(providers$CartoDB.Positron) %>%
addPolygons(data = cpc_sf,
fillColor = "blue", fillOpacity = 0.5,
color = NA) %>%
fitBounds(lng1, lat1, lng2, lat2)Figure 2.1: Location of the wildfire from 2019 analyzed in the Mexican province of Sierra Madre Occidental of Durango State, Mexico. AGAF = Aggregated active fire perimeter. Fuelbed types (Scale: 1:250.000): 1.1.GR1 = Warm-humid tall grass, 1.2.GR2 = Temperate-humid short grass and shrublands, 1.3.GR3 = Semiarid short grass and shrublands, 2.1.GS1 = Semiarid grass and shrublands, 2.2.GS2 = Arid grass and shrublands, 3.1.SH1 = Arid tall shrublands, 3.2.SH2 = Arid short shrublands, 4.1.TU1 = Subhumid temperate timber understory with dense shrubs, 4.2.TU2 = Humid temperate-cold timber understory with dense pasture, 4.3.TU3 = Subhumid timber understory with sparse grasslands, 4.4.TU4 = Subhumid warm to semiarid timber understory with sparse grass and shrublands, 5.1.TL1 = Humid temperate short needle coniferous timber litter, 5.2.TL2 = Humid long needle coniferous timber litter, 5.3.TL3 = Subhumid to humid sclerophyll broadleaf timber litter, 5.4.TL4 = Seasonally dry humid broadleaf timber litter, 7.NB = Not burnable (bare ground), 8.NB1 = Not forestry areas (e.g. urban development, agricultural) and 8.1.NB2 = Water bodies.
We develop a GEE-code to download specific bands using Sentinel-2 data (“COPERNICUS/S2_SR_HARMONIZED”). The workflow begins after defining the ROI and extracting wildfire occurrence dates to create post-fire composite bands (see Table 2.1 ). A cloud masking function removes cloud interference using scene classification mask (SCL) filters out unwanted elements like shadows, snow, and water.
| Attribute | Value |
|---|---|
| Wildfire ID | 19DUR01 |
| UTM Zone | 13 |
| Occurred between | 2019-04-24 to 2019-05-31 |
| Time window (post-fire) | 60 days |
| Post-fire period | 2019-05-31 to 2019-07-30 |
| Images found in post-fire | 48 |
| Image Collection | COPERNICUS/S2_SR_HARMONIZED (48 elements) |
To generate a composite image, exploratory analyses have been conducted using different composite techniques (mean, median, and minimum) and various time windows (1, 15, 30, 60, and 90 days). The time window that best predicted wildfire severity based on field variables was 60 days, using the 25th percentile composite (see Reference. The script selects the Red (B4) and Near-Infrared (B8) bands, applying a percentile 25 reduction.
The download include also the RGB Sentinel bands (B2 and B3) to enabled the color natural visualization and false infrarred color (see Figure 2.2c and d).