Satellite Imagery Analysis — Core Concepts
Satellite imagery analysis extracts meaningful information from Earth-observation data. Python’s scientific stack — Rasterio for I/O, NumPy for math, and domain libraries for search and discovery — makes this workflow accessible on a laptop.
Spectral bands
Unlike a phone camera that captures red, green, and blue, satellites capture many spectral bands, including wavelengths invisible to the human eye:
| Band name | Wavelength | What it reveals |
|---|---|---|
| Blue | 450-510 nm | Water bodies, atmospheric scattering |
| Green | 530-590 nm | Vegetation vigor |
| Red | 640-670 nm | Chlorophyll absorption |
| Near-infrared (NIR) | 780-900 nm | Plant cell structure, biomass |
| Short-wave IR (SWIR) | 1,550-1,750 nm | Soil moisture, burn scars |
| Thermal IR | 10,000-12,000 nm | Surface temperature |
Each band is stored as a separate layer in the raster file. Analysis combines these layers with arithmetic to highlight specific features.
Vegetation indices
The most common calculation is NDVI — Normalized Difference Vegetation Index:
import rasterio
import numpy as np
with rasterio.open("sentinel2.tif") as src:
red = src.read(4).astype(np.float32)
nir = src.read(8).astype(np.float32)
ndvi = (nir - red) / (nir + red + 1e-10)
# Values: -1 to 1. Above 0.3 = healthy vegetation
Other useful indices:
- NDWI (water):
(green - nir) / (green + nir)— highlights water bodies - NBR (fire):
(nir - swir) / (nir + swir)— detects burn scars - NDBI (built-up):
(swir - nir) / (swir + nir)— highlights urban areas
Data discovery with STAC
SpatioTemporal Asset Catalogs (STAC) let you search for satellite imagery by location, date, and cloud cover:
from pystac_client import Client
catalog = Client.open("https://earth-search.aws.element84.com/v1")
search = catalog.search(
collections=["sentinel-2-l2a"],
bbox=[-73.99, 40.70, -73.95, 40.75],
datetime="2025-06-01/2025-06-30",
query={"eo:cloud_cover": {"lt": 10}},
)
items = list(search.items())
print(f"Found {len(items)} scenes")
STAC catalogs from AWS, Microsoft Planetary Computer, and Google Earth Engine index petabytes of free imagery.
Cloud masking
Clouds ruin satellite analysis. Most Level-2 products include a Scene Classification Layer (SCL) that labels each pixel:
with rasterio.open("SCL.tif") as src:
scl = src.read(1)
# SCL values: 3=cloud shadow, 8=cloud medium, 9=cloud high
cloud_mask = np.isin(scl, [3, 8, 9])
ndvi_clean = np.where(cloud_mask, np.nan, ndvi)
Always mask clouds before computing statistics — a single cloudy pixel can skew an entire field’s average.
Change detection
Comparing two dates reveals what changed:
ndvi_before = compute_ndvi("2025-01-15.tif")
ndvi_after = compute_ndvi("2025-07-15.tif")
change = ndvi_after - ndvi_before
# Positive = greening (crop growth)
# Negative = browning (harvest, deforestation, fire)
Threshold the change map to create a binary mask of significant events.
Resolution and data sources
| Satellite | Resolution | Revisit | Cost |
|---|---|---|---|
| Sentinel-2 | 10 m | 5 days | Free |
| Landsat 8/9 | 30 m | 16 days | Free |
| Planet Dove | 3 m | Daily | Commercial |
| MODIS | 250 m | Daily | Free |
Sentinel-2 is the most popular choice for vegetation and land-use analysis because it balances resolution, revisit time, and cost.
Common misconception
People often think higher resolution is always better. In practice, coarser data like MODIS is superior for large-area, long-term trend analysis because it has daily coverage and a 20+ year archive. Resolution should match the question, not the ego.
The one thing to remember: Satellite analysis is band math — by combining visible and invisible light measurements from different spectral channels, Python can quantify vegetation health, water extent, urban growth, and fire damage from free, publicly available imagery.
See Also
- Python Adaptive Learning Systems How Python builds learning apps that adjust to each student like a personal tutor who knows exactly what you need next.
- Python Airflow Learn Airflow as a timetable manager that makes sure data tasks run in the right order every day.
- Python Altair Learn Altair through the idea of drawing charts by describing rules, not by hand-placing every visual element.
- Python Automated Grading How Python grades homework and exams automatically, from simple answer keys to understanding written essays.
- Python Batch Vs Stream Processing Batch processing is like doing laundry once a week; stream processing is like a self-cleaning shirt that cleans itself constantly.