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
open_geotiff windowed reads of non-georef TIFFs produce float64 half-pixel-shifted coords #1710
A TIFF with no GeoTIFF tags (no ModelPixelScale, no ModelTiepoint, no GeoKeys) gets different y/x coordinates depending on whether window= is passed.
Full read takes the has_georef=False branch in _geo_to_coords and returns integer pixel coords [0, 1, 2, ...] with int64 dtype.
Windowed read of the same file skips _geo_to_coords entirely and synthesises coords from the default GeoTransform(origin=0, pixel_width=1, pixel_height=-1). That produces float64 coords like [-0.5, -1.5, -2.5, ...] because the PixelIsArea half-pixel shift gets applied to a unit transform that was never real.
Every read path has the same split: open_geotiff, read_geotiff_dask, read_geotiff_gpu, and dask+cupy.
Windowed reads of a non-georef TIFF should match the full-read convention: integer pixel indices [r0, r0+1, ..., r1-1] for y and [c0, c0+1, ..., c1-1] for x, dtype int64.
The DataArray also should not carry a synthetic attrs['transform'] for a file with no GeoTIFF tags. A non-georef file should round-trip through to_geotiff without picking up a fabricated identity transform.
MEDIUM. Only triggers for TIFFs without GeoTIFF tags, which are rare in spatial workflows. But the silent int64-to-float64 shift and the half-pixel coord offset between full and windowed reads of the same file can quietly break downstream coord-based math.
Activity
Fix windowed reads of non-georef TIFFs producing half-pixel-shifted c…
Update sweep-metadata state CSV for geotiff (xarray-contrib#1710)
Fix windowed read coords of non-georef TIFFs (#1710) (#1722)
geotiff: GPU stripped windowed coords honour has_georef=False (#1753)
geotiff: GPU stripped windowed coords honour has_georef=False (#1753) (…
geotiff: address self-review on golden corpus oracle (xarray-contrib#…
geotiff: golden corpus oracle harness (#1930, phase 1.2) (#1991)