Skip to content

Commit

Permalink
fix: clip then sel after opening
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-moss committed Oct 17, 2023
1 parent ea3f8d7 commit a7e3cd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transport_performance/population/rasterpop.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ def _read_and_clip(
# cell touched and `from_disk` for improved reading speeds.
self._xds = (
rioxarray.open_rasterio(self.__filepath, masked=True)
.sel(band=band)
.rio.clip([aoi_bounds], from_disk=True, all_touched=True)
.sel(band=band)
)

# checks that array has only two dimensions
Expand Down

0 comments on commit a7e3cd4

Please sign in to comment.