Land use/land cover classification using Sentinel-2 imagery and Random Forest for South-Western Rwanda
# Land Use / Land Cover Classification for South-Western Rwanda
## Overview
This project uses Sentinel-2 satellite imagery and machine learning to classify land use and land cover (LULC) in a region of South-Western Rwanda.
The model classifies the area into four classes:
* **Forest**
* **Tea**
* **Water**
* **Other**
The final result is a georeferenced LULC map covering the study area.
## Data
The project uses two main datasets:
### Training Data
* **File:** `data/train_val.shp`
* **Format:** Shapefile
* **Total points:** 800
* **Points per class:** 200
* **Classes:** Forest, Tea, Water, Other
The shapefile also includes the required `.shx`, `.dbf`, `.prj`, and `.cpg` files.
### Sentinel-2 Imagery
* **File:** `data/S2_srw.tif`
* **Format:** GeoTIFF
* **Bands:** 11 Sentinel-2 surface reflectance bands (B2–B9, B11, B12)
* **Coverage:** Study area in South-Western Rwanda
Both the training points and satellite imagery use **EPSG:4326 (WGS84)**, so no reprojection was required.
## Environment Setup
The project was developed using a Conda environment called `rwanda-oath`.
### Create the environment
```bash
conda create -n rwanda-oath python=3.11 -y
conda activate rwanda-oath
conda install -c conda-forge geopandas rasterio shapely fiona scikit-learn pandas numpy matplotlib jupyter -y
```
### Main packages
* `geopandas` — working with the training points
* `rasterio` — reading and processing satellite imagery
* `scikit-learn` — machine learning
* `pandas` and `numpy` — data processing
* `matplotlib` — visualization
* `jupyter` — running the analysis notebook
## Methodology
The classification workflow follows these main steps:
### 1. Load and inspect the data
The training points were loaded using GeoPandas, while Rasterio was used to inspect the Sentinel-2 image, including its bands, CRS, bounds, and dimensions.
### 2. Explore the data
The training data was checked for class balance and missing values.
There are **200 points for each class**, givi …