Understanding Sentinel-2 L2A Scene Classification Map with Python Codes
Sentinel-2 L2A Scene Classification Map Classes
Next related article: Create a water mask from Sentinel-2 satellite imagery using the Scene Classification Layer (SCL)
Sentinel-2 is a satellite mission developed by the European Space Agency (ESA) as part of the Copernicus program. The Sentinel-2 mission is designed to provide high-resolution, multispectral imagery of the Earth’s surface for a wide range of environmental monitoring and management applications. One of the key products of the Sentinel-2 mission is the Level-2A (L2A) Scene Classification Map, which provides information on the land cover and land use of the areas imaged by the satellite.
Before diving into the details of the Sentinel-2 L2A Scene Classification Map, it’s important to understand the basics of Sentinel-2 data processing. Sentinel-2 data is available in two levels: Level-1C (L1C) and Level-2A (L2A). Level-1C data is the raw, unprocessed data from the satellite, while Level-2A data is processed to correct for atmospheric effects and other factors that can impact the quality and accuracy of the data. The L2A Scene Classification Map is derived from Level-2A data.
The L2A Scene Classification Map is generated using a machine learning algorithm that analyzes the spectral and spatial properties of the pixels in the image and assigns them to one of 11 different classes. These classes include “No Data”, “Saturated or Defective”, “Dark area pixels”, “Cloud Shadows”, “Vegetation”, “non-Vegetated”, “Water”, “Unclassified”, “Cloud medium”, “Cloud high”, “Thin cirrus” and “Snow”. Each of these classes is associated with specific spectral and spatial signatures that allow the machine learning algorithm to accurately classify pixels based on their characteristics.

The L2A Scene Classification Map provides valuable information on the land cover and land use of the areas imaged by Sentinel-2. This information is critical for a range of environmental monitoring and management applications, including land use planning, agriculture, forestry, and natural resource management. By identifying areas of different land cover and land use, users can better understand the distribution and extent of different types of land cover and track changes in land use over time.
One of the key advantages of the Sentinel-2 L2A Scene Classification Map is its high spatial resolution. Sentinel-2 is capable of capturing imagery at a spatial resolution of 10 meters, which allows for detailed analysis of land cover and land use patterns. This high spatial resolution is particularly useful for applications such as urban planning and infrastructure development, where detailed information on the built environment is critical.
Another advantage of the Sentinel-2 L2A Scene Classification Map is its ability to capture imagery in multiple spectral bands. Sentinel-2 is capable of capturing imagery in 13 spectral bands, which allows for detailed analysis of the spectral properties of different types of land cover. This information is particularly useful for applications such as vegetation monitoring, where different types of vegetation have distinct spectral signatures that can be used to identify them.
In conclusion, the Sentinel-2 L2A Scene Classification Map is a valuable tool for environmental monitoring and management applications. By providing information on the land cover and land use of the areas imaged by Sentinel-2, the L2A Scene Classification Map allows users to better understand the distribution and extent of different types of land cover and track changes in land use over time. With its high spatial resolution and multispectral capabilities, the Sentinel-2 L2A Scene Classification Map is an essential resource for anyone working in environmental monitoring and management.
import os
import shutil
from glob import glob
from enum import Enum
import rasterio
from rasterio.transform import Affine
from rasterio.enums import Resampling
from rasterio.warp import calculate_default_transform
import numpy as npscl = "T48PWS_20200101T032129_SCL_20m.tif"
src = rasterio.open(scl)
r_mask = src.read(1)
r_mask.shape
# create mask boolean with the condition
mask_all = np.isin(r_mask, [4, 7])Full codes: here
Thanks for reading!!!
Follow our Social Accounts- Facebook/Instagram/Linkedin/Twitter
Join AImonks Youtube Channel to get interesting videos.






