Skip to content

GeoTIFF NoData Small

rasterGeoTIFFEPSG:32633tinybundled

A GeoTIFF with an explicit NoData sentinel. Statistics computed over the raw array rather than the valid pixels are silently wrong — a classic raster bug.

Pixels of geotiff_nodata_small, a 10x10 raster, with NoData in magenta
10x10 px. Rendered from the case's actual pixels, contrast-stretched for display; NoData is shown in magenta.
Property Value
Case ID geotiff_nodata_small
Category raster
Format GeoTIFF
CRS EPSG:32633
Location Central Europe (synthetic, UTM 33N) — 15.00°E, 50.55°N → 15.14°E, 50.64°N
Test tier unit
Size class tiny
Storage class bundled
Redistributable yes
Loader rasterio
Status validated

Use this case

import pytest


@pytest.mark.geocase_case("geotiff_nodata_small")
def test_geotiff_nodata_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 that NoData pixels are correctly masked and excluded from statistical computations (min, max, mean).

Risk types covered

  • data/nan_propagation
  • measurement/incorrect_statistics
  • nodata/ignored

Expected behavior

Assertion Expected
expect_loadable yes
expect_crs yes
expected_epsg 32633
expect_nodata yes
expected_shape [10, 10]

Known answer

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

Quantity Value
Mean over valid pixels 48.0787352901
Mean including NoData -152.8628394157
NoData pixels 2
Bounds (case CRS) [500000.0, 5600000.0, 510000.0, 5610000.0]

Notes

Purpose

Single-band raster with explicit NoData sentinel (-9999) for masking and statistics validation.

What to expect

  • CRS is EPSG:32633.
  • One band (float32).
  • NoData is set and present in pixel values.

Typical checks

  • assert_band_count(src, 1)
  • assert_dtype(src, "float32")
  • assert_nodata_value(src, -9999)
  • assert_nodata_masked(data, nodata)

Common failure modes

  • NoData ignored in mean/min/max computations.
  • NoData converted to valid values during type casting.

Required capabilities

  • load
  • nodata-check
  • statistics

Files

Browse this case on GitHub

Source and license

  • Source: geocase-curated
  • License: MIT

Tags

geotiff masking nodata raster