Land Cover Mapping with Python (part 2 )

Bertrandlobo
3 min readMay 4, 2022

--

A guide to building upon the foundation laid in part 1

Introduction

Part1 of this story featured a step by step guide to accessing and downloading Sentinel-2 Satellite Data and plotting it in Python. To jump right into part 2, another dataset of agricultural fields in Munich, Germany is accessed via EO Browser. Various indices in land cover mapping are trained on this dataset in the Jupyter notebook.

1. The AOI (Area of Interest )

Jumping right into python, the code of this part can be found on this GitHub repository. The 12 bands of the data can be plotted as follows.

Sentinel-2 band data, Source: Author

For an RGB (Red, Green, Blue) plot with stretch applied, the following line of code generates it.

2. Land Cover Mapping

Various indices like vegetation, soil, moisture, water, and geology can be mapped by training the formulas for each index on the sample dataset. These basic algorithms can then be used for any dataset of choice.

A. NDVI (Normalized Difference Vegetation Index )

It is given by the formula and mapped as,

NDVI =NDVI = ((NIR — Red)/(NIR + Red))
where NIR = Near Infrared band , Red= Red band

NDVI, Source: Author

B. SAVI (Soil-Adjusted Vegetation Index )

The formula and plot,

SAVI = ((NIR — red)/(NIR + Red + L)) * (1 + L)

where NIR = Near Infrared
Red = red band , L = green vegetation cover (Defined)

SAVI, Source: Author

C. VARI (Visible Atmospheric resistant index )

VARI = ((Green — Red)/(Green + Red — Blue))

where Green = pixel values from band green
Red = pixel values from red band, Blue = Values of pixels from blue band

VARI , Source : Author

D. MNDWI (Modified Normalized Difference Water Index )

MNDWI = MNDWI = (Green — SWIR) / (Green + SWIR)
Green = pixel values from the green band
SWIR = pixel values from the short-wave infrared band

MNDWI, Source: Author

E. NDMI (Normalized Difference Moisture Index )

NDMI = (NIR — SWIR1)/(NIR + SWIR1)
NIR = pixel values from the near infrared band
SWIR1 = pixel values from the short-wave infrared 1 band

NDMI, Source: Author

F. Geology Indices — Ferrous Minerals and clay minerals

Ferrous and Clay Minerals , Source : Author

Conclusion

This story shows the various methods of land cover mapping using Sentinel 2 data. The algorithms used are basic formulas used for agriculture and builds a foundation for further machine learning techniques. Supervised and Unsupervised learning, deep neural networks in agriculture can be of use for precision farming and crop monitoring.

References :

--

--

Bertrandlobo

Python Enthusiast for Data Visualization, Remote Sensing, Machine Learning, Data Science.