Skip to content

Rotated Square (Rotation and Nothing Else)

rasterGeoTIFFEPSG:32633tinybundled

A plain filled 8x8 square whose only unusual property is a 30-degree rotation in its geotransform. No nodata, no sparse islands, no footprint question. rotated_two_islands found real defects but bundles rotation with two other variables, so a failure there needs an argument about which one caused it; this case removes the argument.

Pixels of rotated_only_square, a 8x8 raster, with NoData in magenta
1 band, 8x8 px, float32. Rendered from the case's actual pixels, contrast-stretched for display; NoData is shown in magenta.
Property Value
Case ID rotated_only_square
Category raster
Format GeoTIFF
CRS EPSG:32633
Location Central Mediterranean (synthetic, UTM 33N) — 12.46°E, 45.12°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("rotated_only_square")
def test_rotated_only_square(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

Prove a consumer's bounds or inverse-affine handling wrong with exactly one possible cause. The case ships its own answer -- expected_bounds and a pixel/world round trip -- so the consumer asserts against a declared number instead of hand-rolling the inverse affine, which is what round 4's only irreducible finding actually required.

Risk types covered

Expected behavior

Assertion Expected
expect_loadable yes
expect_crs yes
expected_epsg 32633
expect_nodata no
expected_band_count 1
expected_dtype float32
expected_shape [8, 8]
expected_transform_signs negative_e, rotated

Known answer

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

Quantity Value
NoData pixels 0
Bounds (case CRS) [299920.0, 4999941.435935395, 300138.5640646055, 5000160.0]
Pixel to world (row, col, x, y) [[0.0, 0.0, 300003.6602540378, 5000146.339745962], [7.0, 7.0, 300054.9038105677, 4999955.096189433], [4.0, 4.0, 300032.9422863406, 5000037.0577136595]]

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_islands was 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

  • load
  • affine-transform-check
  • bounds-check
  • transform-inspection

Files

Browse this case on GitHub

Source and license

  • Source: geocase-curated
  • License: MIT

Tags

control georeferencing geotiff raster rotated single-variable transform