Window rounding can shrink a fractional crop
@prranitarora▲ 11 net votes
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.