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
to_geotiff leaves the previous file's PAM sidecar behind on overwrite #3595
to_geotiff writes PAM .aux.xml sidecars next to the output file: a categorical RAT when the DataArray carries attrs['category_names'] (#3483), and STATISTICS_* entries for color_ramp= (#3537). When a later write targets the same path but produces no sidecar of its own, the old .aux.xml stays on disk and now describes the wrong pixels:
open_geotiff merges the sidecar back onto attrs, so a continuous raster written over an old categorical one comes back with category_names / category_colors from the overwritten file. QGIS then renders the float raster as three classes, and a rasterize -> to_geotiff round-trip re-writes the bogus RAT.
GDAL tools and QGIS read the stale STATISTICS_MINIMUM / STATISTICS_MAXIMUM and stretch the new data with the old file's range.
GDAL's GTiff driver deletes associated PAM sidecars when it creates a dataset over an existing path (GDALDriver::QuietDelete), so gdal_translate onto the same path does not hit this.
Expected behavior
Writing a GeoTIFF to a string path should refresh the PAM sidecar: replaced when the new write emits one, removed when it does not. The .qml style sidecar is different. QGIS treats .qml as user styling that persists across data updates, so it should only be replaced by a new color_ramp= write.
Activity
Address review: failed-write sidecar test, top-level docstring note, …
Record LOW band-mismatch sidecar edge in metadata-sweep state (#3595)
Supersede af18dfe: keep the both-sides conflict resolution (main's #3596
Remove the previous file's PAM sidecar when to_geotiff overwrites a p…
sweep-metadata: re-audit geotiff 2026-07-02 (no new findings)
Security sweep re-audit (pass 23) for geotiff: no new findings