You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stripped HTTP TIFF reads ignore window and caller max_pixels #1842
The stripped branch of _fetch_decode_cog_http_tiles in xrspatial/geotiff/_reader.py (around line 2003) calls source.read_all() and then slices the decoded array. Two issues:
A windowed HTTP read of a stripped multi-billion-pixel COG still downloads the whole raster. The tiled branch a few lines below explicitly promises otherwise: "A windowed HTTP read of a multi-billion-pixel COG only allocates the window." The stripped path silently violates that.
Fix: for stripped HTTP files with a non-None window, fetch only the byte ranges of strips intersecting [r0:r1] via read_ranges_coalesced (same as the tiled path), decode them, and place the result into a windowed output. Apply max_pixels to the windowed (r1-r0)*(c1-c0)*samples allocation, not the full image. When window is None, keep the full read but pass max_pixels into _read_strips so the dimension check honours the caller's cap.
Activity
geotiff: honour window and max_pixels for stripped HTTP reads (#1842) (…