Skip to content

Multispectral Sentinel-2-like Small

rasterGeoTIFFEPSG:32633tinybundled

A tiny four-band uint16 Sentinel-2 L2A stack (B02, B03, B04, B08) with processing-baseline 04.00 radiometry: sentinel NoData 0, band scale 1e-4 with offset -0.1 (BOA reflectance = (DN - 1000) / 10000), and BOA_ADD_OFFSET / QUANTIFICATION_VALUE / PROCESSING_BASELINE product tags. Generated by geocase.raster.presets, whose constants are machine-checked against a real granule's MTD_MSIL2A.xml (tests/synth/test_spec_fidelity.py).

Pixels of multispectral_s2_like_small, a 16x16 raster, with NoData in magenta
4 bands, 16x16 px, uint16, sentinel NoData. Rendered from the case's actual pixels, contrast-stretched for display; NoData is shown in magenta.
Property Value
Case ID multispectral_s2_like_small
Category raster
Format GeoTIFF
CRS EPSG:32633
Location Southern Italy / Sicily (synthetic, UTM 33N) — 15.00°E, 40.65°N → 15.00°E, 40.65°N
Test tier integration
Size class tiny
Storage class bundled
Redistributable yes
Loader rasterio
Status validated

Use this case

import pytest


@pytest.mark.geocase_case("multispectral_s2_like_small")
def test_multispectral_s2_like_small(geocase_case) -> None:
    data = geocase_case.load()
    assert data is not None

Use GeoCase in your tests

Install the complete set of vector, raster, and NetCDF dependencies:

pip install "geocase[all]"

View GeoCase on PyPI.

What this case checks

Confirm GeoCase preserves a four-band uint16 multispectral stack, its band ordering, and its sentinel NoData convention.

Risk types covered

Expected behavior

Assertion Expected
expect_loadable yes
expect_crs yes
expected_epsg 32633
expect_nodata yes
expected_band_count 4
expected_dtype uint16
expected_shape [16, 16]
expected_nodata_value 0
nodata_convention sentinel
expected_compression deflate
expected_band_names B02, B03, B04, B08
expected_scale_factor 0.0001

Known answer

Computed from the actual bytes and gated against them. Grade your own output against these.

Quantity Value
Mean over valid pixels 4140.306122449
Mean including NoData 3169.921875
NoData pixels 240
Bounds (case CRS) [500000.0, 4499840.0, 500160.0, 4500000.0]

Notes

Purpose

Multispectral baseline for validating four-band uint16 reflectance handling.

What to expect

  • CRS is EPSG:32633.
  • Four uint16 bands named blue, green, red, nir.
  • 16×16 pixels, DEFLATE compressed.
  • NoData sentinel is 0.

Typical checks

  • assert_band_count(src, 4)
  • assert_dtype(src, "uint16")
  • assert_nodata_value(src, 0)
  • assert_band_names(src, ["blue", "green", "red", "nir"])

Common failure modes

  • NIR band dropped, leaving an RGB-only stack.
  • Band order assumed to be RGB rather than BGR-NIR.
  • Sentinel NoData treated as a valid reflectance value.

Regenerate

python scripts/generate_raster_fixtures.py

Required capabilities

  • load
  • multiband-read
  • nodata-check
  • band-name-check

Files

Browse this case on GitHub

Source and license

  • Source: geocase-synthetic
  • License: MIT

Tags

delivery:single-file eo geography:utm geotiff multispectral product:multispectral raster sentinel2