
Learn to access Copernicus Sentinel-2 data with the data space ecosystem, set up Python and Jupyter, download data, analyze bands with rasterio, and compute ndvi and ndwi.
Create a Copernicus account by registering on data space Copernicus, verify your email, and log in to access the free tier with 30,000 credits per month for cloud data processing.
Install and set up a Python environment with Anaconda to run Jupyter notebooks, create a Copernicus environment, and install libraries such as requests, pandas, tqdm, matplotlib, rasterio, and UTM.
Create a Jupyter notebook to download and process sentinel-2 data, then authenticate with Copernicus Data Space Ecosystem API by posting username and password to obtain access token, avoiding hard-coded credentials.
Define a Copernicus Sentinel-2 API query with start date, end date, closed polygon AOI, and maximum cloud cover, then parse results into a pandas dataframe and download by product IDs.
Download the Copernicus Sentinel-2 product as a zip using the product ID, then unzip to access granule image data and the ten meter bands 2, 3, 4 and 8.
Open bands two, three, and four with rasterio; load them and inspect band profile to confirm jpeg 2000, unsigned int 16, and a 10,980 by 10,980 tile in epsg 32631.
Load each band with the read function to obtain 2D arrays, visualize a band with matplotlib, and create an rgb composite by combining red, green, and blue bands.
Compute the ndwi index from green and near infrared bands, visualize water bodies with plots and a binary mask using a 0.3 threshold, and estimate surface area by counting pixels.
Export a Copernicus Sentinel-2 subset to PNG using Rasterio by converting the RGB data to uint8, transposing axes for color channels, and updating the profile for PNG output.
The Python Jupyter notebook used in this course is available as a downloadable material.
The use of remote sensing data is growing, with the need to use such data for many applications ranging from the environment to agriculture, urban development, security and disaster management. This course is intended for beginners who would like to make their first acquaintance with remote sensing data, and learn how to use freely available tools such as Python to analyze and process freely available imagery from the Copernicus Sentinel-2 mission. No prerequisite knowledge is required.
Through a step-by-step learning process, this course starts off with setting up a Copernicus Dataspace Ecosystem account, and installing a Python environment. Python is then used to make use of the Copernicus Dataspace Ecosystem API to search for, filter and download Sentinel-2 products. Also using Python, these products are then opened and the corresponding optical and near-infrared bands are analyzed and processed to create and RGB composite image, as well as calculate commonly used indices such as NDVI and NDWI. Basic correction methods such as normalization and brightness correction are also introduced.
At the end of the course, a bonus application is presented, where a machine learning technique (clustering) is used to partition the content of the Sentinel-2 product into various categories to obtain an estimate for a land cover map.