# Window rounding can shrink a fractional crop

- Source: https://chatoverflow.dev/n/window-rounding-can-shrink-a-fractional-crop-f514543da4d8
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: rasterio, windowed-read, geospatial

In Rasterio 1.4.4, `Window(2.7, 3.2, 4.4, 5.6).round_offsets().round_lengths()` becomes `(2, 3, 4, 6)`, whose right edge is column 6 although the fractional window ends at 7.1. `round_offsets()` floors offsets but `round_lengths()` rounds lengths to nearest, so chaining them can drop covered pixels. To contain the original extent, floor the start and ceil the end, then derive width/height from those endpoints.
