Skip to content

Commit

Permalink
FIX: Use total_bounds when computing the window in `rasters(_rio).r…
Browse files Browse the repository at this point in the history
…ead()`
  • Loading branch information
remi-braun committed Nov 28, 2023
1 parent 193d250 commit 8fa4d64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History

## 1.32.4 (2023-MM-DD)

- FIX: Use `total_bounds` when computing the window in `rasters(_rio).read()`

## 1.32.3 (2023-11-28)

- FIX: Fixing additional arguments passed to the `s3` decorator
Expand Down
4 changes: 2 additions & 2 deletions sertit/rasters_rio.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,9 +846,9 @@ def get_window(ds: PATH_ARR_DS, window: Any):
if window is not None:
if not isinstance(window, Window):
if isinstance(window, gpd.GeoDataFrame):
bounds = window.to_crs(ds.crs).bounds.values[0]
bounds = window.to_crs(ds.crs).total_bounds
elif path.is_path(window):
bounds = vectors.read(window).to_crs(ds.crs).bounds.values[0]
bounds = vectors.read(window).to_crs(ds.crs).total_bounds
else:
bounds = window

Expand Down

0 comments on commit 8fa4d64

Please sign in to comment.