Preamble¶
Tools: Python, Jupyter Notebook, rasterio, matplotlib
Data: Sentinel-2 sample images (same dataset as Sessions 2 and 3)
Goal: read, inspect, visualize and process raster data in Python.
Learning Objectives¶
By the end of this session, students will be able to:
Read raster data in Python using
rasterioDisplay key raster properties (CRS, dimensions, resolution, dtype, NoData)
Visualize spectral bands and RGB composites with
matplotlibCompute NDVI from Sentinel-2 bands
Save a new raster file from Python
Course Material¶
Python environment¶
We recommend creating the following course environment with Conda:
Windows / Linux / macOS
Open a terminal (or Anaconda Prompt on Windows) and run:
conda env create -f environment.ymlThen activate the environment:
conda activate eo-cv-courseNotebook¶
📓 Jupyter Notebook:
📥 Download the notebook
If you encounter difficulties installing the Python environment locally, you can run the notebook directly in Google Colab:
Dataset¶
📂 Labworks data:
📥 session_1_data.zip