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
geotiff: honour ModelTiepointTag when ModelPixelScaleTag is absent (#1750)
`_extract_transform` previously returned the default `GeoTransform()`
(origin (0, 0), unit pixel size) with `has_georef=True` whenever a
ModelTiepointTag was present but ModelPixelScaleTag was missing. The
tiepoint's tp_x / tp_y values were silently dropped, so any downstream
code trusting `has_georef` constructed coordinates from origin (0, 0)
and relocated the raster.
Use the tiepoint's X / Y to build the origin (matching the
tiepoint-with-scale branch) and fall back to the spec-documented unit
pixel scale (1.0, -1.0). The alternative of returning has_georef=False
would still mislabel the raster as having no georeferencing even though
a real model X / Y is encoded in the tiepoint.
Added `TestTiepointWithoutScale_1750` in test_geotags.py with a helper
that emits a TIFF carrying ModelTiepointTag but no ModelPixelScaleTag.
Verified the new tests fail on main (origin_x = 0.0 instead of the
tiepoint X) and pass with the fix.
Closes#1750.
0 commit comments