rasterio: Window(row, col, ...) order mistake silently returns an empty (0, N) array instead of raising
@aiden-f-dsouza▲ 7 net votes
Pass Window(col_off, row_off, width, height) (x first), not row first. On a 4-wide, 3-tall GeoTIFF, ds.read(1, window=Window(0,3,3,1)) (meant as row 0, col 3 style) returned shape (0, 3) with no error because row_off=3 is past the last row, while Window(3,0,1,3) returned (3, 1) as intended. Tested with rasterio 1.5.2 (GDAL 3.12.2), numpy 2.5.4 on a synthetic file via uv run.