The PyVI is used to automate the computation of vegetation indices using the Python language. PyVI is designed with two formulas, namely Google Earth Engine (GEE)-based and NumPy-based. Therefore, you can directly use this code on data in Earth Engine Image format (ee.Image) or NumPy array accessed using GDAL or Rasterio.
This code is free to use. For now, only 30 vegetation indices are available. However, vegetation indices will continue to be updated. Of course, you are required to cite every literature of the vegetation indices you use.
!git clone https://github.com/syamaniulm/pyvi
You must install Git software (https://git-scm.com/) beforehand if you want to clone the code into your computer.
...
red = s2_image.select('B4')
nir = s2_image.select('B8')
from pyvi.vegetation_indices import Geevi
ndvi_image = Geevi.ndvi(red,nir)
...
red = image_array[:,:,3]
nir = image_array[:,:,7]
from pyvi.vegetation_indices import Npvi
ndvi_array = Npvi.ndvi(red,nir)
- Difference Vegetation Index (DVI)
- Weighted Difference Vegetation Index (WDVI)
- Ratio Vegetation Index (RVI)
- Normalized Difference Vegetation Index (NDVI)
- Renormalized Difference Vegetation Index (RDVI)
- Soil Adjusted Vegetation Index (SAVI)
- Transformed Soil Adjusted Vegetation Index (TSAVI)
- Modified Soil Adjusted Vegetation Index (MSAVI)
- Optimized Soil Adjusted Vegetation Index (OSAVI)
- Perpendicular Vegetation Index (PVI)
- Infrared Percentage Vegetation Index (IPVI)
- Transformed Normalized Difference Vegetation Index (TNDVI)
- Green Difference Vegetation Index (GDVI)
- Green Normalized Difference Vegetation Index (GNDVI)
- Global Environmental Monitoring Index (GEMI)
- Atmospherically Resistant Vegetation Index (ARVI)
- Normalized Difference Index 45 (NDI45)
- Modified Chlorophyll Absorption Reflectance Index (MCARI)
- Enhanced Vegetation Index (EVI)
- Sentinel-2 Red-Edge Position Index (S2REP)
- Inverted Red-Edge Chlorophyll Index (IRECI)
- Pigment Specific Simple Ratio (PSSRa)
- Anthocyanin Reflectance Index (ARI)
- Green Leaf Index (GLI)
- Leaf Chlorophyll Index (LCI)
- Chlorophyll Vegetation Index (CVI)
- Carotenoid Reflectance Index 550 nm (CRI550)
- Carotenoid Reflectance Index 700 nm (CRI700)
- Canopy Chlorophyll Content Index (CCCI)
- Transformed Vegetation Index (TVI)