diff --git a/datacube/storage/_read.py b/datacube/storage/_read.py index c88aaeded..2c1dd05f9 100644 --- a/datacube/storage/_read.py +++ b/datacube/storage/_read.py @@ -129,6 +129,7 @@ def read_time_slice(rdr, is_nn = is_resampling_nn(resampling) scale = pick_read_scale(rr.scale, rdr) + scale_x, scale_y = [pick_read_scale(s) for s in rr.scale2] paste_ok, _ = can_paste(rr, ttol=0.9 if is_nn else 0.01) @@ -188,7 +189,8 @@ def norm_read_args(roi, shape, extra_dim_index): src_nodata=rdr.nodata, dst_nodata=dst_nodata) else: rio_reproject(pix, dst, src_gbox, dst_gbox, resampling, - src_nodata=rdr.nodata, dst_nodata=dst_nodata) + src_nodata=rdr.nodata, dst_nodata=dst_nodata, + XSCALE=scale_x, YSCALE=scale_y) return rr.roi_dst diff --git a/docs/about/whats_new.rst b/docs/about/whats_new.rst index fe863fe8d..17ab15fdf 100644 --- a/docs/about/whats_new.rst +++ b/docs/about/whats_new.rst @@ -15,6 +15,9 @@ v1.8.next - ``datacube dataset`` cli commands print error message if missing argument (:pull:`1437`) - Add pre-commit hook to verify license headers (:pull:`1438`) - Support open-ended date ranges in `datacube dataset search`, `dc.load`, and `dc.find_datasets` (:pull:`1439`, :pull:`1443`) +- Pass Y and Y Scale factors through to rasterio.warp.reproject, to eliminate projection bug affecting + non-square Areas Of Interest (See `Issue #1448`_) (:pull:`1450`) +.. _`Issue #1448`: https://github.com/opendatacube/datacube-core/issues/1448 v1.8.12 (7th March 2023)