Skip to content

Commit

Permalink
Fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
rosepearson committed Oct 10, 2023
1 parent b95cb84 commit bda5b78
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/geofabrics/dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1708,12 +1708,14 @@ def add_coarse_dems(
)
return False
# Check for overlap with the Coarse DEM
coarse_dem_bounds = (
coarse_dem = (
rioxarray.rioxarray.open_rasterio(coarse_dem_path, masked=True)
.squeeze("band", drop=True)
.set_crs(self.catchment_geometry.crs["horizontal"])
.rio.bounds()
)
coarse_dem_resolution = coarse_dem.rio.resolution()
resolution = max(abs(resolution[0]), abs(resolution[1]))
coarse_dem_bounds = coarse_dem.rio.bounds()
coarse_dem_bounds = geopandas.GeoDataFrame(
{
"geometry": [
Expand Down Expand Up @@ -1741,15 +1743,15 @@ def add_coarse_dems(

if chunk_size is None:
self._add_coarse_dem_no_chunking(
coarse_dem=coarse_dem,
coarse_dem_path=coarse_dem_path,
mask=no_value_mask,
)
else:
self._add_coarse_dem_chunked(
coarse_dem_path=coarse_dem_path,
chunk_size=chunk_size,
mask=no_value_mask,
radius=coarse_dem.resolution * numpy.sqrt(2),
radius=coarse_dem_resolution * numpy.sqrt(2),
)

def _add_coarse_dem_no_chunking(
Expand Down

0 comments on commit bda5b78

Please sign in to comment.