Learn how to calculate, interpret, and apply vegetation indices like NDVI, EVI, and more for environmental monitoring.
Vegetation indices are mathematical combinations of satellite spectral bands designed to highlight vegetation properties and conditions. They leverage the fact that healthy vegetation reflects strongly in the near-infrared spectrum while absorbing red light.
The most widely used vegetation index, NDVI measures vegetation health and density.
Formula: (NIR - Red) / (NIR + Red)
Value Range: -1 to 1
[Image: NDVI map with color scale showing vegetation health]
NDVI visualization showing varying levels of vegetation health across a landscape.
An improved version of NDVI with better sensitivity in high biomass regions and reduced atmospheric influences.
Formula: 2.5 * ((NIR - Red) / (NIR + 6 * Red - 7.5 * Blue + 1))
Value Range: -1 to 1
Advantages over NDVI:
[Image: Comparison of NDVI and EVI over dense forest]
Comparison showing how EVI provides better differentiation in areas of dense vegetation where NDVI saturates.
Index | Formula | Application | Value Range |
---|---|---|---|
NDMI (Normalized Difference Moisture Index) | (NIR - SWIR) / (NIR + SWIR) | Vegetation water content, drought monitoring | -1 to 1 |
NDWI (Normalized Difference Water Index) | (Green - NIR) / (Green + NIR) | Open water detection, water content in leaves | -1 to 1 |
LAI (Leaf Area Index) | 3.618 * EVI (simplified) | Canopy structure, biomass estimation | 0 to 7 |
SAVI (Soil Adjusted Vegetation Index) | (1 + L) * (NIR - Red) / (NIR + Red + L) | Areas with significant soil exposure | -1 to 1 |
ObservEarth provides easy access to pre-calculated vegetation indices through our API:
GET /api/s2/image/{geometry_id}/
Parameter | Type | Required | Description |
---|---|---|---|
item_id | string | Yes | ID of the satellite image |
image_type | string | Yes | Image format (png, jpeg, tiff) |
index | string | Yes | Vegetation index (ndvi, evi, ndmi, ndwi, lai) |
colormap | string | No | Color palette for visualization |
[Image: NDVI visualization with RdYlGn colormap]
NDVI with RdYlGn colormap
[Image: NDVI visualization with Viridis colormap]
NDVI with Viridis colormap
[Image: NDVI visualization with custom colormap]
NDVI with custom colormap
import requests
import matplotlib.pyplot as plt
from PIL import Image
from io import BytesIO
api_key = "your_api_key_here"
geometry_id = "123e4567-e89b-12d3-a456-426614174000"
item_id = "S2A_MSIL2A_20230105T123456_N0509_R123_T18TXM_20230105T150000"
url = f"https://observearth.com/api/s2/image/{geometry_id}/"
params = {
"item_id": item_id,
"image_type": "png",
"index": "ndvi",
"colormap": "RdYlGn",
"min_value": 0.0,
"max_value": 0.8
}
headers = {
"X-API-Key": api_key
}
response = requests.get(url, headers=headers, params=params)
if response.status_code == 200:
# Display the image
img = Image.open(BytesIO(response.content))
plt.figure(figsize=(10, 8))
plt.imshow(img)
plt.title("NDVI Visualization")
plt.axis('off')
plt.show()
else:
print(f"Error: {response.status_code}")
print(response.text)
Proper interpretation of vegetation indices requires understanding what they represent and their limitations:
[Image: NDVI time series showing seasonal vegetation changes]
NDVI time series showing seasonal vegetation patterns over a year.
[Image: NDVI anomaly map showing deviation from historical average]
NDVI anomaly map showing areas with vegetation health above or below historical averages.
[Image: NDVI map showing crop health variations across fields]
Vegetation indices help farmers monitor crop health, detect stress, and optimize irrigation and fertilizer application.
[Image: EVI map showing forest disturbance after a wildfire]
Indices can detect deforestation, monitor forest recovery after disturbances, and assess overall forest health.
[Image: NDMI map showing moisture stress during drought]
Moisture-sensitive indices like NDMI can detect early signs of drought stress in vegetation before visual symptoms appear.
[Image: Habitat classification based on vegetation indices]
Vegetation indices can help identify different habitat types and assess ecosystem health and biodiversity.
Now that you understand vegetation indices, you can: