Skip to content

Commit

Permalink
address warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rosepearson committed Sep 12, 2024
1 parent 298c36d commit dca0c96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/geofabrics/dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def calculate_dem_bounds(self, dem):
def _set_up(self):
"""Set DEM CRS and trim the DEM to size"""

self._dem.rio.set_crs(self._extents["total"].crs)
self._dem.rio.write_crs(self._extents["total"].crs, inplace=True)

# Calculate DEM bounds and check for overlap before clip
dem_bounds = self.calculate_dem_bounds(self._dem)
Expand Down Expand Up @@ -2374,7 +2374,7 @@ def add_patch(self, patch_path: pathlib.Path, label: str, layer: str):
patch_path,
masked=True,
).squeeze("band", drop=True)
patch.rio.set_crs(self.catchment_geometry.crs["horizontal"])
patch.rio.write_crs(self.catchment_geometry.crs["horizontal"], inplace=True)
patch_resolution = patch.rio.resolution()
patch_resolution = max(abs(patch_resolution[0]), abs(patch_resolution[1]))
# Define region to patch within
Expand Down

0 comments on commit dca0c96

Please sign in to comment.