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.
| 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:
What this case checks¶
Confirm that NoData pixels are correctly masked and excluded from statistical computations (min, max, mean).
Risk types covered¶
data/nan_propagationmeasurement/incorrect_statisticsnodata/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¶
loadnodata-checkstatistics
Files¶
- Primary:
nodata_sample.tif - Notes:
notes.md
Source and license¶
- Source: geocase-curated
- License: MIT
Tags¶
geotiff masking nodata raster
Related cases¶
- Hole Center NoData Raster --
hole_center_nodata - Land Cover With Ambiguous Zero --
landcover_ambiguous_zero_small - Nodata Only (One Sentinel, North-Up, Unrotated) --
nodata_only_dem_small - Bottom-Up DEM (Positive Y Resolution) --
bottom_up_dem_small - COG Multispectral Small --
cog_multispectral_small