Nodata Only (One Sentinel, North-Up, Unrotated)¶
A north-up 8x8 DEM whose only unusual property is two interior -9999 sentinel pixels. No rotation, no bottom-up affine, no ambiguity about whether the sentinel is also a legitimate value. The two sentinels sit in the interior rather than on the border, so a consumer that crops edges cannot skip past them.
| Property | Value |
|---|---|
| Case ID | nodata_only_dem_small |
| Category | raster |
| Format | GeoTIFF |
| CRS | EPSG:32633 |
| Location | Central Mediterranean (synthetic, UTM 33N) — 12.46°E, 45.13°N → 12.46°E, 45.13°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("nodata_only_dem_small")
def test_nodata_only_dem_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¶
Separate "the consumer forgot to mask" from every other reason a statistic can be wrong. The case declares both means, and the gap between them is the defect: a consumer that ignores nodata reproduces expected_mean_naive, and one that masks correctly reproduces expected_mean_masked.
Risk types covered¶
Expected behavior¶
| Assertion | Expected |
|---|---|
expect_loadable |
yes |
expect_crs |
yes |
expected_epsg |
32633 |
expect_nodata |
yes |
expected_band_count |
1 |
expected_dtype |
float32 |
expected_shape |
[8, 8] |
expected_nodata_value |
-9999.0 |
nodata_convention |
sentinel |
expected_transform_signs |
negative_e |
Known answer¶
Computed from the actual bytes and gated against them. Grade your own output against these.
| Quantity | Value |
|---|---|
| Mean over valid pixels | 31.4838709677 |
| Mean including NoData | -281.96875 |
| NoData pixels | 2 |
| Bounds (case CRS) | [300000.0, 5000000.0, 300160.0, 5000160.0] |
Notes¶
Three rasters that each differ from a plain north-up square in exactly one respect. They exist because of an observation from the third external round:
rotated_two_islandswas the round's one genuine discovery — a rotated geotransform the reporter would not have constructed unprompted. But it bundles rotation with sparse islands with footprint generation. A failure with one possible cause is a better bug-finder than a case combining three risks.
| case | isolates | bundled counterpart |
|---|---|---|
rotated_only_square |
a rotated geotransform (30°) | rotated_two_islands |
nodata_only_dem_small |
one sentinel nodata value | — |
bottom_up_only_square |
a positive-e affine |
bottom_up_dem_small |
How to use them¶
They are controls, not coverage. Run a consumer against the control and its bundled counterpart together:
- fails on both → the defect is the isolated convention, and it is localised with no further argument;
- fails on the bundled case only → the interaction between variables is what breaks it, which is a different and more interesting bug;
- fails on the control only → the bundled case is masking the defect, which usually means a second variable is short-circuiting the code path.
What is deliberately absent¶
rotated_only_square and bottom_up_only_square carry no nodata at all —
src.nodata is None, not a declared sentinel that never appears. A sentinel
that is declared and never occurs is the "declared but ungated" shape that Plan
28 Phase 1 found six times in this very corpus, and it would reintroduce the
second variable these cases exist to remove.
nodata_only_dem_small's two sentinels sit in the interior (rows 3 and 4),
not on the border. A border sentinel is skipped by any consumer that crops
edges before computing statistics, which would make the case silently inert.
None of the three is a new from_origin baseline. Plans 37 §3.3 and 38 §4.5
both record that the corpus is already thick there and that no format baseline
has found a defect in three rounds.
The answers are shipped, not implied¶
All three declare expected_bounds, and rotated_only_square also declares
expected_pixel_world_pairs — the pixel↔world round trip. That is the oracle
round 4's reporter had to hand-roll before they could prove a bounds bug, and
it is the difference between a case that is a stimulus and one that is an
oracle. Every declared value is generated from the real bytes by
scripts/catalog_truth.py and gated by scripts/validate_case_content.py, so
none of them can drift away from the pixels.
Required capabilities¶
loadnodata-checkstatistics-checkbounds-check
Files¶
- Primary:
nodata_only_dem_small.tif - Notes:
notes.md
Source and license¶
- Source: geocase-curated
- License: MIT
Tags¶
control dem geotiff nodata raster single-variable
Related cases¶
- DEM NaN NoData Small --
dem_nan_nodata_small - DEM Small --
dem_small - GeoTIFF NoData Small --
geotiff_nodata_small - Hole Center NoData Raster --
hole_center_nodata - Land Cover With Ambiguous Zero --
landcover_ambiguous_zero_small