Learn how to access and analyze MODIS satellite imagery for daily global coverage at moderate resolution.
MODIS (Moderate Resolution Imaging Spectroradiometer) is an instrument aboard the Terra and Aqua satellites that provides daily global coverage at moderate spatial resolution.
Collection | Description | Resolution | Temporal |
---|---|---|---|
modis-13A1-061 | Vegetation Indices 16-Day L3 Global 500m | 500m | 16-day |
modis-13Q1-061 | Vegetation Indices 16-Day L3 Global 250m | 250m | 16-day |
modis-14A1-061 | Thermal Anomalies & Fire Daily L3 Global 1km | 1km | Daily |
modis-17A2HGF-061 | Gross Primary Productivity Gap-Filled 8-Day L4 Global 500m | 500m | 8-day |
modis-17A2H-061 | Gross Primary Productivity 8-Day L4 Global 500m | 500m | 8-day |
modis-11A2-061 | Land Surface Temperature & Emissivity 8-Day L3 Global 1km | 1km | 8-day |
To find MODIS imagery for your area of interest, use the search endpoint:
POST
https://observearth.com/api/modis/search/
Parameter | Type | Required | Description |
---|---|---|---|
geometry_id | UUID | Yes | UUID of your Area of Interest |
start_date | string | Yes | Start date in YYYY-MM-DD format |
end_date | string | Yes | End date in YYYY-MM-DD format |
product | string | No | MODIS product (e.g., "modis-13A1-061", "modis-11A2-061") |
import requests
import json
api_key = "your_api_key_here"
url = "https://observearth.com/api/modis/search/"
payload = {
"geometry_id": "123e4567-e89b-12d3-a456-426614174000",
"start_date": "2023-01-01",
"end_date": "2023-01-31",
"product": "modis-13A1-061"
}
headers = {
"X-API-Key": api_key,
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
data = response.json()
print(f"Found {data['count']} images")
for image in data['results']:
print(f"ID: {image['id']}, Date: {image['date']}, Product: {image['product']}")
Once you've found available MODIS images, you can calculate statistics for various indices over your area of interest.
POST
https://observearth.com/api/modis/stats/
Parameter | Type | Required | Description |
---|---|---|---|
geometry_id | UUID | Yes | UUID of your Area of Interest |
start_date | string | Yes | Start date in YYYY-MM-DD format |
end_date | string | Yes | End date in YYYY-MM-DD format |
collection | string | Yes | MODIS collection (e.g., "modis-13A1-061") |
index | string | Yes | Index to analyze (e.g., "500m_16_days_NDVI") |
import requests
import json
api_key = "your_api_key_here"
url = "https://observearth.com/api/modis/stats/"
payload = {
"geometry_id": "123e4567-e89b-12d3-a456-426614174000",
"start_date": "2023-01-01",
"end_date": "2023-03-31",
"collection": "modis-13A1-061",
"index": "500m_16_days_NDVI"
}
headers = {
"X-API-Key": api_key,
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
data = response.json()
for result in data:
print(f"Date: {result['date']}, Mean: {result['mean']:.2f}, Min: {result['min']:.2f}, Max: {result['max']:.2f}")
You can retrieve MODIS imagery for visualization and analysis:
GET
https://observearth.com/api/modis/image/{geometry_id}/
Parameter | Type | Description |
---|---|---|
geometry_id | UUID | UUID of your Area of Interest |
Parameter | Type | Required | Description |
---|---|---|---|
item_id | string | Yes | ID of the MODIS image |
collection | string | Yes | MODIS collection (e.g., "modis-13A1-061") |
index | string | Yes | Index to visualize (e.g., "500m_16_days_NDVI") |
image_type | string | Yes | Image format (png, tiff) |
colormap | string | No | Color palette for visualization (e.g., "RdYlGn") |
import requests
import os
from PIL import Image
from io import BytesIO
api_key = "your_api_key_here"
geometry_id = "123e4567-e89b-12d3-a456-426614174000"
item_id = "MODIS_ITEM_ID_HERE"
url = f"https://observearth.com/api/modis/image/{geometry_id}/"
params = {
"item_id": item_id,
"collection": "modis-13A1-061",
"index": "500m_16_days_NDVI",
"image_type": "png",
"colormap": "RdYlGn"
}
headers = {
"X-API-Key": api_key
}
response = requests.get(url, headers=headers, params=params)
if response.status_code == 200:
# Save the image
with open("modis_ndvi.png", "wb") as f:
f.write(response.content)
# Display the image
img = Image.open(BytesIO(response.content))
img.show()
print("Image saved as modis_ndvi.png")
else:
print(f"Error: {response.status_code}")
print(response.text)
MODIS provides various indices and data layers across different collections:
Index | Description | Value Range |
---|---|---|
500m_16_days_NDVI | Normalized Difference Vegetation Index | -0.5 to 1 |
500m_16_days_EVI | Enhanced Vegetation Index | -0.5 to 1 |
500m_16_days_NIR_reflectance | Near-infrared reflectance | -0.5 to 1 |
500m_16_days_red_reflectance | Red band reflectance | -0.5 to 1 |
500m_16_days_blue_reflectance | Blue band reflectance | -0.5 to 1 |
500m_16_days_MIR_reflectance | Mid-infrared reflectance | -0.5 to 1 |
Index | Description | Value Range |
---|---|---|
LST_Day_1km | Land Surface Temperature (Day) | 7500 to 65535 |
QC_Day | Quality Control for Day measurements | 0 to 255 |
Day_view_time | Time of day observation | 0 to 240 |
Index | Description | Value Range |
---|---|---|
FireMask | Fire mask classification | 0 to 366 |
MaxFRP | Maximum Fire Radiative Power | 0 to 366 |
QA | Quality Assessment | 0 to 255 |
MODIS's global coverage and long data record make it ideal for large-scale environmental monitoring:
MODIS provides consistent global vegetation monitoring, allowing detection of anomalies and trends across continents.
MODIS thermal bands can detect active fires globally, providing critical information for fire management and monitoring.
Now that you understand how to work with MODIS imagery, you can: