Preamble¶
Tools: Python, QGIS (optional)
Data: Multi-date Sentinel-2 images over Casablanca / Bouskoura forest
Goal: identify areas of potential vegetation water stress using spectral indices and multi-date analysis
Project objective¶
The objective of this project is to detect and map vegetation water stress using Sentinel-2 multi-date imagery.
You will spectral information to compare vegetation conditions between different dates and identify areas showing possible stress.
At this stage, the focus is on:
preparing and organizing the data
computing relevant spectral indices
comparing several dates
interpreting spatial patterns
optionally performing a simple unsupervised classification
preparing reference data for supervised classification in the next session
Study area¶
The study area is located in Casablanca, including the Bouskoura forest.
This area is well suited for the project because it includes:
vegetated areas
urban areas
bare soil
seasonal variability in vegetation condition
Recommended dates¶
To study vegetation water stress, it is recommended to compare images acquired during different periods of the year:
Wet season: February or March
Transition period: May or June
Dry season: August or September
📂 Labworks data
📥 session_5_data.zip
Suggested spectral indices¶
The following indices are recommended for this project:
1. NDVI — vegetation activity¶
NDVI helps identify vegetation vigor.
NDVI = (B8 - B4) / (B8 + B4)
High NDVI → dense / healthy vegetation
Low NDVI → sparse vegetation, bare soil, urban surfaces
2. NDMI (or vegetation moisture index)¶
NDMI is useful for vegetation water content and moisture stress.
NDMI = (B8 - B11) / (B8 + B11)
High NDMI → wetter vegetation
Low NDMI → drier vegetation / possible stress
3. Optional indices¶
If useful, you may also test:
simple use of SWIR band (B11)
difference between dates:
NDVI_date2 - NDVI_date1
NDMI_date2 - NDMI_date1
These differences can help highlight areas where vegetation condition decreases over time.
Expected workflow¶
Task 1 – Select and prepare the data¶
Download Sentinel-2 images for the selected dates
Keep the relevant bands:
B4— RedB8— NIRB11— SWIR
Clip the images to the study area
Check that the rasters are aligned and comparable
Task 2 – Compute the indices¶
Use Python or the Raster Calculator in QGIS to compute NDVI and NDMI for each date.
Expected workflow¶
Task 1 – Select and prepare the data¶
Download Sentinel-2 images for the selected dates
Keep the relevant bands:
B4— RedB8— NIRB11— SWIR
Clip the images to the study area
Check that the rasters are aligned and comparable
Task 3 – Compare dates¶
Display the computed indices for the different dates.
Use:
color maps
histograms
pixel value inspection
side-by-side comparison
Questions¶
Which date shows the highest vegetation activity?
Which date shows the strongest moisture deficit?
Are all vegetated areas affected in the same way?
Do some areas remain green or moist during the dry season?
Task 4 – Map potential stress classes¶
Create a simple classification of vegetation stress based on NDVI and/or NDMI or other selected features.
Example:
| Class | Meaning |
|---|---|
| 1 | Low stress |
| 2 | Moderate stress |
| 3 | High stress |
This classification can be done:
visually
by thresholding
using raster expressions
Example idea¶
Use NDMI values to separate wetter and drier vegetation.
Then compare with NDVI to distinguish sparse vegetation from stressed vegetation.
Task 5 – Optional unsupervised classification¶
If time allows, you may test a simple unsupervised approach to group pixels with similar spectral behaviour.
The objective is to:
explore patterns in the data
identify potential vegetation stress groups
compare results with index-based interpretation
Possible variables:
NDVI
NDMI
Red band
NIR band
SWIR band
Example method: K-means clustering
Task 6 – Prepare training data for the next session¶
In QGIS, create a vector layer and draw polygons representing different vegetation conditions.
Suggested classes:
healthy vegetation
moderately stressed vegetation
highly stressed vegetation
non-vegetated surfaces
water
Important recommendations¶
Draw polygons on homogeneous areas
Avoid boundaries between land cover types
Create several polygons per class
Distribute polygons across the study area
These polygons will be used as training data for supervised classification in the next session.
Expected outputs¶
Each group should produce:
A short description of the selected dates
At least one NDVI map
At least one NDMI map
A preliminary vegetation stress map
A vector layer containing training polygons
A short interpretation of the spatial and temporal patterns observed
Deliverables¶
At the end of the project preparation phase, each group should submit:
the selected Sentinel-2 rasters
the computed index rasters
the QGIS project
the training polygons
one or two exported maps (PDF)
a short methodological note