From 00a43cb844cfc6a585598250ca527747e5b4572e Mon Sep 17 00:00:00 2001 From: Brendan Collins Date: Thu, 28 May 2026 06:03:50 -0700 Subject: [PATCH] CHANGELOG: clarify #2536 fix applies to all polygonize return types The PR description for #2541 notes that the auto-detected transform is applied inside `_scan`, so every return_type (numpy, awkward, geopandas, spatialpandas, geojson) benefits. The CHANGELOG entry only mentioned return_type='geopandas', which understates the fix scope. --- CHANGELOG.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b341eacb..362705bd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,17 +6,20 @@ #### Fixed -- `polygonize(return_type='geopandas')` now auto-detects the raster's - affine transform from `attrs['transform']` (xrspatial.geotiff - convention) or `rio.transform()` (rioxarray) when the caller did - not pass an explicit `transform=` argument. Previously the function - auto-detected `attrs['crs']` and stamped it on the `GeoDataFrame` - while leaving the geometries in pixel space, so the CRS attribute - claimed projected space but the coordinates did not match. Callers - who relied on the pre-fix behaviour and expected pixel-space - geometries from a rasterio-loaded raster should pass `transform= - np.array([1, 0, 0, 0, 1, 0])` explicitly, or strip the transform - attr before calling polygonize. (#2536) +- `polygonize` now auto-detects the raster's affine transform from + `attrs['transform']` (xrspatial.geotiff convention) or + `rio.transform()` (rioxarray) when the caller did not pass an + explicit `transform=` argument. The auto-detected transform is + applied inside `_scan`, so it covers every `return_type` option + (`numpy`, `awkward`, `geopandas`, `spatialpandas`, `geojson`). + Previously `polygonize(return_type='geopandas')` auto-detected + `attrs['crs']` and stamped it on the `GeoDataFrame` while leaving + the geometries in pixel space, so the CRS attribute claimed + projected space but the coordinates did not match. Callers who + relied on the pre-fix behaviour and expected pixel-space geometries + from a rasterio-loaded raster should pass + `transform=np.array([1, 0, 0, 0, 1, 0])` explicitly, or strip the + transform attr before calling polygonize. (#2536) ### Version 0.10.0 - 2026-05-27