Skip to content

Water Mask Small

rasterGeoTIFFEPSG:32633tinybundled

A uint8 binary water mask with NoData 255. Code that treats the mask as 0/1 counts NoData pixels as water, inflating every areal statistic.

Pixels of water_mask_small, a 16x16 raster, with NoData in magenta
1 band, 16x16 px, uint8, sentinel NoData. Rendered from the case's actual pixels, contrast-stretched for display; NoData is shown in magenta.
Property Value
Case ID water_mask_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("water_mask_small")
def test_water_mask_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 can open a binary water mask, preserve its single uint8 band, and honour the sentinel NoData value during masking logic.

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 uint8
expected_shape [16, 16]
expected_nodata_value 255
nodata_convention sentinel
expected_compression deflate
expected_band_names water

Known answer

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

Quantity Value
Mean over valid pixels 0.2509803922
Mean including NoData 1.24609375
NoData pixels 1
Bounds (case CRS) [500000.0, 4499840.0, 500160.0, 4500000.0]

Notes

Purpose

Binary mask baseline for validating mask-style raster handling and nodata logic.

What to expect

  • CRS is EPSG:32633.
  • One uint8 band named water (0 = land, 1 = water).
  • 16×16 pixels, DEFLATE compressed.
  • NoData sentinel is 255 (one pixel).

Typical checks

  • assert_band_count(src, 1)
  • assert_dtype(src, "uint8")
  • assert_nodata_value(src, 255)

Common failure modes

  • NoData 255 counted as water/land.
  • Mask promoted to a float dtype.

Regenerate

python scripts/generate_raster_fixtures.py

Required capabilities

  • load
  • nodata-check
  • mask-read

Files

Browse this case on GitHub

Source and license

  • Source: geocase-synthetic
  • License: MIT

Tags

delivery:single-file eo geography:utm geotiff mask product:mask raster water