PYTHON · GEOSPATIAL AUTOMATION · LANDSAT

From catalog search to finished raster comparison.One reproducible workflow.

A Python pipeline that retrieves, validates, aligns, compares, summarizes, and visualizes multisensor surface-temperature data for Brevard County.

PythonRasterioNumPySTAC APIQA bit masking

01 / GENERATED OUTPUT

The code produces the map and the evidence behind it.

Only locations with valid, quality-screened temperature values in both periods are displayed and summarized.

Brevard County paired-pixel Landsat 9 minus Landsat 7 surface-temperature difference map, with automated workflow metrics.
Python-generated Landsat surface-temperature difference · Brevard County, Florida

02 / RUN SUMMARY

Measured output, carefully framed.

The values describe this specific pair of February datasets. They are not estimates of regional climate change.

+4.71°C

Mean difference

The average Landsat 9 minus Landsat 7 value among the paired clear-land pixels.

+4.87°C

Median difference

The midpoint of the paired-pixel differences, less sensitive to extreme values than the mean.

69.7%

Above +2°C

The share of paired pixels more than 2°C warmer in the later observation.

247,033

Pixels compared

Clear land cells remaining after the county clip, QA masks, alignment, and paired-data requirement.

03 / AUTOMATION

A transparent five-stage pipeline.

The workflow connects data discovery, raster processing, quality assurance, calculation, and communication in a single repeatable script.

  1. 01

    Search and select

    Query the Landsat Collection 2 Level-2 STAC catalog for the specified February acquisitions and scene identifiers.

  2. 02

    Read only what is needed

    Stream the Brevard County windows from cloud-optimized GeoTIFFs instead of downloading every full Landsat band.

  3. 03

    Apply quality controls

    Decode QA bits to remove fill, clouds, cloud shadows, snow, water, saturation, and Landsat 7 dropped pixels.

  4. 04

    Align and compare

    Reproject the quality-screened mosaics to a common 60-meter grid and calculate Landsat 9 minus Landsat 7 in Celsius.

  5. 05

    Report reproducibly

    Generate the finished map and a machine-readable JSON summary from the same script used for the analysis.

QA masking

rejected_bits = sum(1 << bit
  for bit in (0, 1, 3, 4, 5, 7))
valid = ((qa_pixel & rejected_bits) == 0)
valid &= qa_radsat == 0

Temperature and difference

temperature_c = dn * 0.00341802
  + 149.0 - 273.15
difference = landsat_9 - landsat_7

04 / DATA INTEGRITY

The missing pixels are part of the story.

Landsat 7 scan-line gaps remain visible. The workflow rejects dropped and fill pixels rather than interpolating them into apparently complete data.

Acquisition conditions matter. Weather, moisture, atmosphere, overpass timing, emissivity, and sensor differences can affect the result.

This is a workflow demonstration. Multiple years, additional dates, and environmental controls would be required before making a long-term trend claim.

05 / REPRODUCIBLE MATERIALS

Inspect the code and the run summary.

The downloadable Python file contains the complete workflow; the JSON file records the exact metrics generated by the published run.

Source data: USGS Landsat Collection 2 Level-2, accessed through Microsoft Planetary Computer. Boundary: U.S. Census Bureau TIGERweb.