返回文章列表
spacelandsat-surface-reflectance-qa-pixel-composite
🛰️

Which Landsat Pixels Should Count as a Change on the Ground?

Decode Landsat Collection 2 reflectance and QA to distinguish a usable observation from cloud, shadow, fill, and missed coverage.

iBuidl Research2026-11-1817 min 阅读

TL;DR A Landsat change map needs observations that are valid on both dates and comparable for the intended use. Apply the documented Collection 2 surface reflectance scale and offset after excluding fill. Decode per-pixel quality and band-specific flags, align the grids, and report the area your rules excluded. A cloud-free-looking image can still contain unusable measurements for a particular analysis.

A map promises evidence over a whole watershed

A fictional analyst called Esther receives two Landsat 8 or 9 Collection 2 Level-2 scenes covering a watershed. A colleague wants a simple map showing where vegetation may have changed between dates. The underlying files cover the same general region, and both previews look presentable. One has shadows near a hill. The other shows a small bright band along a cloud edge. A lightweight script calculates a vegetation index and subtracts one raster from the other. The map contains numbers in almost every cell. Esther needs to decide which of those numbers describe usable observations.

She begins with the measurement and the intended claim. The two inputs are estimated surface reflectance products. USGS explains that processing accounts for effects such as atmospheric scattering and absorption. This is distinct from interpreting the digital numbers as already scaled reflectance, and it does not guarantee that all surface conditions produced clean estimates. The intended output is a two-date difference for locations where the team can make a suitable comparison. A map with a full extent can contain unobserved or unusable cells inside that extent. USGS Collection 2 Level-2 products USGS Collection 2 surface reflectance overview

The exercise scopes the flags and band assumptions to Landsat 8 and 9 Collection 2. Other sensors and products have documented variations. A useful analysis record starts with the scene identifiers, sensors, acquisition dates, product levels, band mapping and applicable documentation. The correct mask and data interpretation follow those choices. If an export service delivers already transformed pixels, inspect its metadata and procedures before applying a scale a second time.

Esther explains the difference between finding spectral change and explaining a land event. An index comparison can support a statement about measured reflectance differences under specified conditions. Attributing it to storm damage, management or seasonal development takes separate evidence. The output will still be valuable if it preserves enough context for an investigator to identify where other observations would help. The raster should give a changed value and a known basis for believing it.

Decode a storage number before calculating an index

Landsat Collection 2 Level-2 surface reflectance uses stored integers with an assigned scale and offset. USGS documents multiplication by 0.0000275 and addition of negative 0.2 for the relevant files. It identifies zero as fill for the surface reflectance product. Making a scaled number from a fill value would yield negative 0.2, a real-looking number with a false interpretation. Detect and carry fill or invalid data as missing through subsequent calculations. USGS Level-2 scale and fill table USGS instructions for scale factors

The invented numerical example uses stored values of 10,000 in the red band and 16,000 in the near-infrared band. The applicable conversion gives red reflectance of 0.075 and near-infrared reflectance of 0.24. The sum is 0.315 and the difference is 0.165. In the normalised difference vegetation index, often abbreviated NDVI, dividing the difference by the sum yields about 0.524. This calculation assumes neither band has a disqualifying condition and their sum is suitable for computing the index.

If the same formula is used on the unscaled numbers, the result is 6,000 divided by 26,000, roughly 0.231. A shared multiplicative factor alone could cancel from this ratio. The additive offset contributes to the denominator twice, so the actual comparison does not work that way. This distinction is easy to miss if a sample calculation uses only linear arithmetic or a collection whose representation uses different scaling. Writing the formula with realistic inputs gives the team an inexpensive error check.

A separate issue arises near zero or in unusual reflectance conditions. A strongly negative or nearly zero sum raises questions about what the ratio is intended to mean and how the chosen analysis handles questionable values. Apply appropriate scientific rules and document them. Forcing every division to produce a displayed number by silently inserting a default can make unstable comparisons look like land change. A pipeline that auto-clips all values early should preserve what it did rather than make it impossible to examine which part of the signal was altered.

This is also why the team preserves metadata after exporting a calculation. If a packaged scene is first read into a software layer with automatic scaling, the proof should say which values the next function received. Two script reviewers can easily disagree if one thinks 16,000 is stored and the other thinks 0.24 has already been delivered. A small known-value fixture can demonstrate that the downstream step sees the intended units. An inspector can compare those observed values to the cited reference without needing a full map.

Four pixel cards lie on the review desk

The USGS guide describes bit-packed QA_PIXEL values for Landsat 8 and 9. A pixel can carry more than one property at once. Read the documented flags rather than treating the integer as one category or a score that always increases with quality. The level-two package includes the QA_PIXEL and QA_RADSAT bands described in the documentation. Additional product-specific flags, such as aerosol information in the reflectance product for Landsat 8 and 9, can also inform analysis policy. USGS Collection 2 quality assessment bands

Card one is fill. Esther's example pixel lies in a corner where the scene footprint doesn't provide an observation. QA_PIXEL bit zero identifies fill, and the stored reflectance values in the example are zero. Project processing does not replace the absent observation with bare ground or zero NDVI. The final change map can show a gap with a definition that distinguishes no observation from an observation of no change.

Card two is adjacent to cloud. The fictional pixel has no high-confidence cloud flag in bit three but carries the dilated-cloud flag in bit one. The nearby pixel may look useful in the image preview. A project can treat the dilation flag as a reason for exclusion when cloud-edge contamination would compromise the intended ratio. The appropriate policy concerns the scientific purpose and supported documentation. A mask that checks only bit three won't make the same selections as one that also removes flagged neighborhoods.

Card three carries a shadow warning. A first reading of QA_PIXEL's Clear bit might suggest that all non-obscured conditions are satisfied. According to USGS, that bit describes whether the cloud and dilated-cloud bits are set. It is not a guarantee that shadow, snow, fill, or saturation concerns have been resolved. The team decodes relevant flags individually. In the invented shadow case it excludes the pixel from a vegetation comparison even if the project's cloud-only test would have kept it. USGS Landsat 8 and 9 QA_PIXEL definitions

Card four has a saturated input band. The relevant sensor band is flagged in QA_RADSAT. An index using it inherits a measurement problem from that band. An unrelated analysis using supported other bands can ask whether the same condition applies to its own calculation. A mask can account for band-specific saturation and terrain occlusion where applicable rather than assigning every band the same meaning. Esther checks the mask using the actual index band names and the product's current documentation. USGS QA_RADSAT documentation

The cards also give a way to describe intentional exclusions. A water flag can matter if the intended question concerns vegetation on land, or if the analyst needs to study water separately. Whether coastal conditions, snow, heavy aerosol or other cases should appear depends on the chosen method. The final release describes exclusions precisely enough that a reader can tell whether a missing location was physically outside the observation, rejected under a particular quality rule, or outside the science question.

An analyst can compare two reasonable policies on a representative sample. One may retain more pixels while permitting some conditions the other excludes. That difference is useful if the report tells where the additional pixels lie and what consequences their condition may have. It does not establish that the most restrictive mask always produces the most truthful model. Too much exclusion can make the remaining sample fail to represent the landscape at all. The support for each decision comes from the intended measurement and the observable code, not the number of blank cells alone.

The overlap of valid observations is a separate raster

Esther draws a simple sample of one hundred equal-area cells. Date one has eighty-four valid observations after the chosen checks. Date two has sixty-nine. Fifty-eight are valid on both dates. The same bookkeeping says twenty-six are valid only on date one, eleven only on date two, and five on neither. The total of the four classes is one hundred. The two-date comparison covers fifty-eight observations, not eighty-four, sixty-nine, or the ninety-five cells seen at least once.

This calculation can help detect a misleading summary. Suppose the average NDVI is 0.55 across eighty-four cells on the first day and 0.48 across sixty-nine on the second. The difference of those two reported means is negative 0.07. But the means can emphasize different parts of the watershed because the input populations differ. A paired comparison can compute the change at each of the fifty-eight jointly observed locations and summarize those paired differences. That result answers a different, more specific question about observed overlap.

Pairing can still leave an important selection issue. Those fifty-eight cells might cluster on unobscured dry slopes, while lower areas near waterways are often missing. A paired result remains useful if labelled with its support. It cannot by itself establish that the observed pattern extends to omitted areas. Estimate or describe the coverage by terrain, subregion, or other relevant attributes where appropriate. If the missing group matters to the intended decision, gather further valid observations or limit the stated finding.

In a second invented weighting check, the region has forty near-stream cells and sixty upland cells. Twelve near-stream and forty-six upland cells have support on both dates. Combined valid coverage is fifty-eight percent. The supported fraction is thirty percent for near-stream cells and about seventy-seven percent for the uplands. An overall percentage hides the difference in representation. When decisions depend on the near-stream area, a separate coverage line better describes why further evidence might be needed.

Counting quality classes also helps with pipeline errors. If a rewrite drops all cells from just one scene, the common support count will collapse even if the script successfully produces a raster file. If the missing-data code is interpreted as an ordinary pixel value during reprojection, invalid cells can reappear in the common mask. A separate record of valid counts, overlay, and rejection reasons can catch a problem before somebody reads a gray or white map as a complete result.

Align the measurements before asking one cell to speak for two

Even with clear flags and correct units, the two observations must represent a comparable place. The processing note records projection, pixel grid, resolution and any reprojection or resampling. An output grid with the same number of rows and columns does not establish that every cell is aligned. The test looks beyond array shape to the correct spatial relationship. The particular resampling and alignment decision depends on the dataset and scientific question.

Categorical quality flags require a different interpretation from reflectance measurements. A packed bit code should remain a meaningful quality code rather than becoming an average of neighboring integers. Use a recognized process appropriate to the data and apply it deliberately. A mask aligned through careless interpolation can create a positive-looking result from invalid input. The team tests several locations near boundaries against the original scenes so a new implementation cannot quietly change which original data contribute.

The output edge is especially revealing. A reprojected reflectance surface may receive contributions from neighboring pixels, some excluded by quality. The team should be able to say how its method treated missing or disqualified values near that edge. If the intended pipeline cannot establish sufficient usable support, a blank output is more defensible than a crisp-looking interpolated measurement with hidden provenance. A valid quality selection and suitable resampling have to work together on this scene.

Another issue concerns comparability in time. Both scenes may be valid observations while different sun geometry, season, phenology, moisture or viewing conditions influence the interpretation. The analyst can record the difference and test whether other observations support the claimed land change. With only two measurements, a seasonally stable interpretation may need additional evidence. A well-marked difference map is good at pointing to places and dates worth investigation. Its colors cannot by themselves identify a cause.

A composite commits to one order of operations

Suppose Esther adds multiple accepted dates to each window. The median of individual index values can yield a different result from an index built from median bands. In an invented three-observation example the red and near-infrared pairs are 0.10 and 0.40, then 0.20 and 0.25, then 0.30 and 0.35. The individual indices are about 0.600, 0.111 and 0.077. The median individual index is about 0.111. The separate band medians are 0.20 and 0.35, whose index is about 0.273.

The two results answer distinct compositing questions. One summarizes the distribution of the index already computed for each usable observation. The other calculates from a synthetic pair of summary bands that may never have been observed simultaneously. Both can be useful if the project describes what it wants and ensures valid observations feed each calculation. In this example the median band pair combines values from different source times. The resulting value should not be labelled as an index measured on a particular date.

A composite also needs its sample support. One cell can have three clean observations inside the first period and seven in the second. A different cell might have one in each. An annual layer can appear complete even though some regions rely on very different sampling histories. The analyst retains per-cell counts or comparable metadata. If the use case requires a minimum number of observations or an acceptable range of dates, apply those requirements before reporting differences.

The decision can be repeated under a second plausible compositing rule. If the same change pattern appears after valid changes in defaults and location support, the result can motivate more investigation. If only a handful of cells switch signs under a specific mask or time rule, the report can show precisely where the decision is sensitive. This investigation is more informative than selecting the composite that looks closest to a hoped-for narrative. The actual supported pattern can guide where to seek independent confirmation.

The reopening test compares two policies on the same grid

For a deliberately small mask fixture, consider an integer with only bit six set, which is 64. A second fixture sets both bits six and four, giving 64 plus 16, or 80. A test that checks the Clear flag in both retains both. A test that also explicitly rejects high-confidence cloud shadow can keep the first case and reject the second. They are schematic integers chosen to test documented bit interpretation, not a catalogue of the most commonly produced codes. This exercise shows why using the generic Clear label as a complete policy can produce unexpected differences.

The engineer needs to know what the masked version means in its intended workflow. For one project, treating potential shadow as too uncertain could be justified because the next decision acts on changes in relatively dark areas. Another analysis may explore how a smaller accepted area affects estimation before setting its policy. Data quality information provides the observable condition. A decision rule describes what the project did with it. Name them separately so a user can change the latter without losing the former.

An invented sensitivity experiment uses the same earliest one hundred cells. A baseline strict policy kept fifty-eight paired locations. A second trial retains eight additional paired locations by allowing a class of marginal observations under otherwise identical conditions. The supported area rises to sixty-six cells. All eight additional locations are near cloudy ridges in this simulation. An increase of eight points in overall coverage may be useful, but it does not improve observations away from those ridges. Esther inspects the actual spatial additions before reporting improved regional coverage.

Suppose that six of the added eight have strongly negative indices relative to the other date. That does not prove all six are contaminated. It does make their relationship to the changed mask rule important. The core paired map and the expanded map can be compared with the original spectral observations and selected independent evidence about the area. The report can present the six locations as high-sensitivity cases instead of allowing them to dictate an average without context. If no reliable evidence can assess their quality for the decision, leave that uncertainty visible.

The same review can use the additional aerosol band where available. USGS describes flags related to whether an aerosol estimate was valid, interpolated, and at what level the reported quality system classifies it. Teams should consult the intended science product guide and choose criteria appropriate to their analysis. Merely switching on every condition found in the quality band can throw away usable data without explanation. Independently tally how many observations each exclusion would remove before selecting the policy. Several exclusions can apply to the same pixel, so their raw counts may overlap. USGS Collection 2 aerosol quality information

There is a reproducibility benefit to storing the mask reason separately from the resulting measured value. A later analyst can check which cells were rejected for clouds, which failed the ratio calculation, and which belonged outside the target land class. In an operational map, the user may not need every category shown simultaneously. A separate support layer can preserve them so a maintenance check can recover the cause. When visual categories must be collapsed, retain the original quality information and the selected decoding rules from the scene. A new researcher should have a path back to them without reverse-engineering the color legend.

Publish a map that leaves its gaps readable

The result comes with an eligible comparison layer, a statement of product and time windows, and an inventory of lost coverage. A legend can distinguish paired measurements from missing or excluded areas. An appendix record checks a known scaled value, a cloud-adjacent pixel, a shadow pixel and an affected saturation case. These checks are small enough for an engineer to reproduce and clear enough for a researcher to question. They are stricter evidence than a screenshot of the final map.

Esther hands the colleague a map that still covers the whole watershed as an extent. Within it only certain places support the inference they designed. The figures show where support was lost and which change values depend on the paired observations. Anyone commissioning another observation can see the remaining gaps by place and reason. That is a practical result in its own right. It preserves the useful difference between a change seen on the ground and the information a particular satellite observation could actually provide.

Sources

更多文章