Building Cloud-Free Satellite Basemaps & Seasonal Mosaics
Techniques for turning hundreds of partially cloudy optical passes into radiometrically seamless, cloud-free regional and global mosaics for GIS and machine learning.
Why Single-Scene Selection Fails at Regional Scales
Across tropical rainforests, coastal maritime belts, and temperate mountain ranges, obtaining a single completely cloud-free optical scene over a whole country or river basin is nearly impossible. Even when a mosaic stitches together the least-cloudy scenes from different months, harsh visible seamlines appear wherever spring green-up meets late-summer senescence or wet soil meets dry stubble. Those radiometric discontinuities confuse human analysts and cause convolutional neural networks to learn scene boundaries instead of real land features.
Modern basemap pipelines solve this by operating at the pixel level rather than the whole-scene level. By assembling all Level-2 Surface Reflectance passes inside a target time window—monthly, quarterly, or annual—and discarding masked cloud, shadow, and haze pixels, compositing algorithms select or synthesize the cleanest representative observation at every individual 10-meter or 30-meter coordinate.
- Pixel-based compositing recovers usable data from scenes that are 40–70% cloud covered.
- Consistent temporal windows prevent phenological jumps between adjacent agricultural valleys.
- QA-guided filtering removes saturated, cloud-halo, and scan-artifact pixels before selection.
- Automated mosaicking eliminates manual seamline digitization across continental areas.
Medoid, Median, and Ranked Compositing Methods
Choosing the right compositing statistic determines whether a basemap preserves spectral fidelity or blurs fast-moving features. Simple arithmetic means get skewed upward by unmasked thin clouds and downward by residual shadows. Taking the per-band median suppresses outliers effectively, yet computing medians independently for Red, Green, Blue, and NIR can blend values from different acquisition dates into a synthetic pixel whose spectral ratios never occurred simultaneously on the ground.
Medoid compositing overcomes that limitation by finding the actual single-date observation inside the stack that minimizes Euclidean distance across all spectral bands simultaneously to the multi-band median vector. Because every output band at a given pixel originates from the exact same timestamp, spectral indices, machine-learning embeddings, and land-cover signatures remain physically coherent while still rejecting clouds and shadows.
- Per-band median suits visual RGB backdrops but can mix timestamps across spectral channels.
- Medoid compositing selects a real observed date per pixel, preserving true spectral covariance.
- Best-Available-Pixel (BAP) scoring weights proximity to target date, distance from clouds, and view angle.
- Greenest-pixel (max NDVI) compositing is useful for peak biomass maps but exaggerates seasonal vigor.
BRDF Normalization and Edge Feathering
Even after perfect cloud masking and atmospheric correction, adjacent satellite swaths can display noticeable brightness gradients—especially across Sentinel-2's wide 290-kilometer swath or high-latitude Landsat passes. This effect stems from the Bidirectional Reflectance Distribution Function (BRDF): vegetation canopies and rough soils scatter sunlight differently depending on whether the sensor looks toward the sun (forward scatter, darker shadows) or away from the sun (backscatter, brighter hotspot).
Applying a c-factor Ross-Thick / Li-Sparse BRDF normalization corrects every pixel to a fixed nadir view angle and reference solar zenith angle before compositing. Where residual tonal differences persist across seasonal transitions, multi-band pyramid feathering or histogram matching smooths transitions without blurring sharp road edges, rooftop corners, or field boundaries.
- View-zenith angles vary up to ±10.3° on Sentinel-2 and ±7.5° on Landsat, creating swath brightness seams.
- BRDF normalization aligns oblique edge pixels to uniform nadir-equivalent viewing geometry.
- Avoid aggressive spatial blurring during feathering so 10 m infrastructure edges stay crisp.
- Track per-pixel provenance bands (acquisition day-of-year and sensor ID) alongside composite imagery.
Packaging Basemaps for GIS, Web Tiles, and ML Pipelines
Once a cloud-free mosaic is computed, delivery format determines how fast teams can put it to work. For GIS desktop mapping and cloud analytics, Cloud Optimized GeoTIFF (COG) mosaics organized by spatial tile grid allow direct HTTP range streaming into QGIS, ArcGIS, and Python notebooks. For high-concurrency web maps, generating Web Mercator XYZ/WMTS pyramid tiles enables sub-second panning across continental footprints.
Machine-learning workflows demand stricter numerical discipline than web display tiles. Visual basemaps are often stretched and gamma-corrected to 8-bit uint8 (0–255), which destroys physical reflectance calibration. Always feed segmentation or change-detection models unstretched 16-bit surface reflectance composites (plus optional acquisition-date provenance bands) while reserving 8-bit stretched pyramids strictly for human visual inspection.
- Keep 16-bit calibrated surface reflectance COGs separate from 8-bit visual web-map tiles.
- Include a valid-observation count band so models know where persistent clouds caused sparse sampling.
- Use lossless ZSTD or DEFLATE compression for analytical float/int16 mosaics to preserve exact values.
- Document composite window dates clearly so downstream analysts never confuse seasonal states.
Comparison of Cloud-Free Pixel Compositing Strategies
| Compositing Method | Spectral Integrity | Visual Smoothness | Best Application |
|---|---|---|---|
| Per-Band Median | Synthetic (bands may mix dates) | High | General visual basemaps and web mapping |
| Multi-Band Medoid | High (real single-date pixel) | High | ML training tiles, land-cover classification, indices |
| Best-Available-Pixel (BAP) | High (real single-date pixel) | Medium–High | Annual forest/crop monitoring with target day priority |
| Max-NDVI (Greenest) | Biased toward peak vigor | Medium | Peak growing-season crop extent and biomass |
| Mean after QA Masking | Distorted by residual haze | Low–Medium | Only suitable when strict cloud/haze screening is verified |
Pairing QA cloud/shadow dilation with BRDF normalization raises visual consistency across all five methods.
Worked Illustration: Selecting a Multi-Band Medoid Pixel Across Five Clear Dates
This worked illustration demonstrates how medoid compositing selects a real, cloud-free pixel observation from five candidate summer dates using Red and NIR surface reflectance.
- Illustration inputs: Five QA-cleared observations of a pasture pixel (Red, NIR): Date 1 (0.08, 0.42), Date 2 (0.07, 0.44), Date 3 (0.14, 0.48 — residual thin haze), Date 4 (0.07, 0.43), Date 5 (0.09, 0.41).
- Compute the per-band medians across the five dates: Median(Red) = 0.08; Median(NIR) = 0.43.
- Calculate Euclidean spectral distance `d = sqrt((Red - 0.08)^2 + (NIR - 0.43)^2)` for each date: Date 1 = 0.0100; Date 2 = 0.0141; Date 3 = 0.0781; Date 4 = 0.0100; Date 5 = 0.0141.
- Select the candidate minimizing distance (tie-break to Date 4 closest to mid-window): Output pixel takes Date 4's exact observed pair (Red = 0.07, NIR = 0.43) and logs Date 4 in the provenance band.
Worked Illustration Outcome: Medoid compositing rejects the hazy Date 3 outlier (distance 0.0781) and outputs an authentic single-date spectrum (0.07, 0.43) rather than a blended cross-date artifact.
Cloud-Free Basemap Production Checklist
- Define a tight temporal compositing window aligned with regional phenology or seasonal dry periods.
- Mask cloud, cirrus, cloud shadow, snow, and saturated pixels with 1–2 pixel edge dilation before compositing.
- Apply BRDF view-angle normalization prior to stitching wide-swath Sentinel-2 or high-latitude Landsat passes.
- Use multi-band medoid or BAP compositing when outputs feed spectral indices or machine-learning models.
- Export an observation-count and day-of-year provenance raster alongside every mosaic layer.
- Separate 16-bit analytical surface reflectance COGs from 8-bit contrast-stretched display tiles.
Frequently Asked Questions
Why does a per-band median mosaic sometimes look great visually but distort spectral indices?
Because per-band median calculates each band independently, the Red value at a pixel might come from June while the NIR value comes from August, creating synthetic band combinations that distort sensitive ratios.
How many acquisitions are typically needed for a clean cloud-free mosaic?
In arid regions, 3 to 5 passes often suffice; in persistently cloudy equatorial basins, combining Landsat 8/9 and Sentinel-2 across a 60-to-90-day window provides 15–30 candidate looks to achieve near-100% clear pixel coverage.
Can cloud-free basemaps be used directly for deforestation alerting?
Quarterly or annual basemaps work well as visual reference layers, whereas near-real-time alerting should run directly on individual newly acquired Level-2 scenes so events are detected within days instead of waiting for a full mosaic window to close.
What compression is best for analytical GeoTIFF mosaics?
Use lossless ZSTD or DEFLATE with horizontal differencing predictors for 16-bit or floating-point analytical mosaics, reserving lossy JPEG or WebP compression strictly for 8-bit RGB web viewing.
Primary References & Standards
- Flood, N. (2013) — Seasonal Composite Landsat TM/ETM+ Images Using the Medoid (Multi-Dimensional Median)
- Roy, D. P., et al. (2016) — A General Method to Normalize Landsat Reflectance Data to Nadir BRDF Adjusted Reflectance
- OGC Cloud Optimized GeoTIFF (COG) Standard 1.0 (OGC 21-026)