The 1-Minute Takeaway
Clouds and terrain cast shadows that block sunlight, causing shadowed crops to look dry or stressed in satellite images. A full solution computes solar geometry and elevation data directly to identify and mask out these shadow zones; the platform takes a simpler route, described in the note near the end of this paper.
The Practical Grower's Guide
Satellite cameras measure crop health by checking how much sunlight reflects off the leaves. When a cloud passes overhead, or when a hill blocks the sun, the shadow dims the light, making healthy green plants look dark and dry. To prevent these shadows from triggering false crop stress alerts, a shadow-aware pipeline calculates the exact shape and position of shadows for every satellite pass, then masks out shadowed zones so field averages use only fully lit pixels.
1. The Physics of Light in Shadow Zones
To understand shadow geometry, we must look at how light travels through the atmosphere. Sunlight arriving at the Earth's surface is split into two components:
- Direct Solar Radiation: Light rays traveling directly from the sun to the ground without hitting atmospheric particles. This creates sharp, bright illumination.
- Diffuse Atmospheric Radiation: Light scattered by air molecules, dust, and water vapor (Rayleigh and Mie scattering). This scattered light enters shadow zones from all directions, providing faint, blue-tinted illumination inside the shadow.
Inside a shadow zone, the direct solar radiation is blocked, leaving only the weak diffuse radiation. Because diffuse radiation is dominated by blue wavelengths (which is why the sky is blue), shadowed vegetation displays a distorted spectral signature. The lack of direct red and near-infrared light causes standard greenness indexes (like NDVI) to drop, mimicking severe crop drought. Correcting this requires identifying and removing shadowed pixels.
2. Umbra, Penumbra, and Fuzzy Thresholding
Shadows are not uniform; they consist of two distinct physical zones: the umbra (the dark inner core where direct sunlight is completely blocked) and the penumbra (the outer fringe where the sun's disk is only partially obscured). The width of the penumbra increases with the height of the cloud or terrain casting the shadow.
Inside the penumbra, the spectral signature of the vegetation shifts dynamically as the ratio of direct to diffuse light changes. Applying a simple, binary classification threshold often fails to capture these partial shadows. This results in "edge noise," where partially shadowed pixels remain unmasked and distort field averages. To resolve this, modern algorithms apply a fuzzy logic threshold. The algorithm assigns a shadow probability value between 0.0 (fully lit) and 1.0 (full umbra) to each pixel based on its spectral signature and proximity to the shadow core. Pixels with a probability above a calibrated threshold are masked out, removing edge noise from the final maps.
3. Calculating Shadow Projection Geometry
To locate shadows from first principles, a processing engine can perform three-dimensional solar ray tracing, projecting shadow lines based on the sun's position and the height of the casting object (a cloud or a hill):
Where \(h_{object}\) is the height of the object casting the shadow, \(\theta_{elevation}\) is the solar elevation angle, and \(d_{offset}\) is the horizontal shadow offset on the ground. The direction of the shadow is dictated by the solar azimuth angle (\(\phi_{azimuth}\)).
Cloud base height (\(h_{object}\)) isn't directly observable, so an engine doing this from scratch typically estimates it with a spatial cross-correlation model: identify cloud pixels, project their potential shadow shapes along the solar azimuth line for various candidate altitudes, and pick the altitude whose projected shape best correlates with the actual dark pixels in the scene.
4. Scene Classification and Masking Protocols
In practice, almost nobody needs to build the ray-tracing pipeline above from scratch: Sentinel-2 imagery ships with a pre-computed Scene Classification Layer (SCL) that already flags cloud shadows, cast shadows, cloud probability tiers, and defective pixels per pixel, generated by ESA's own Sen2Cor processor as part of the standard L2A product. Consuming this classification layer directly — rather than re-deriving shadow geometry independently — is the standard, pragmatic approach for most agricultural remote sensing pipelines, this platform included (see the note below).
5. Topographic Shadows and the Copernicus DEM
In hilly or mountainous terrain, the slope of the land creates topographic shadows. A steep hill facing away from the sun receives no direct light, casting a shadow across the valley below. Mapping these terrain shadows independently of the standard SCL classes requires the Copernicus 30m Digital Elevation Model (DEM): calculating the slope and aspect of each terrain pixel relative to the sun's position, and flagging a pixel as shadowed if the local slope angle exceeds the solar elevation angle. This is especially useful in valleys and mountainous microclimates, where the SCL's cloud-shadow detection alone may not catch terrain-cast shade.
Where this fits in the platform today: The platform does not run its own ray-tracing, cloud-height estimation, or DEM-based topographic shadow detection. It relies on Sentinel-2's own Scene Classification Layer — excluding the standard CLOUD_SHADOWS, cloud-probability, cirrus, and defective-pixel classes from every field average, as described in the Sentinel-2C Orbit & MSI Calibration paper. That covers the common case (cloud shadows over relatively flat land) well; it does not add a dedicated topographic-shadow correction for steep terrain, and there's no gap-filling model yet for days when a field is fully obscured — that day's reading is simply skipped rather than interpolated.
Cloud Shadow Offsets: Because clouds float several kilometers above the ground, their shadows can be offset by 1 to 3 kilometers relative to the cloud's position. Precise ray-tracing using wind forecast models is required to lock down shadow boundary accuracy. In areas with high wind speeds, this offset changes rapidly, meaning that static buffers are useless and dynamic projection calculations are required to maintain field-level classification integrity.