Skip to content

Commit

Permalink
potential (very small) fixes for issues Deltares#1119 and Deltares#1120
Browse files Browse the repository at this point in the history
  • Loading branch information
roeldegoede committed Feb 20, 2025
1 parent 0eee53a commit 3fb8d63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hydromt/gis/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def full_from_transform(
transform : affine transform
Two dimensional affine transform for 2D linear mapping.
shape : tuple of int
Length along (dim0, x, y) dimensions, of which the first is optional.
Length along (dim0, y, x) dimensions, of which the first is optional.
nodata : optional
The nodata value to assign to the DataArray. Defaults to np.nan.
dtype : optional
Expand Down
6 changes: 3 additions & 3 deletions hydromt/model/processes/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ def create_grid_from_region(
crs=region_crs,
data_catalog=data_catalog,
)
if crs is not None:
geom = geom.to_crs(crs)
geom = geom.to_crs(4326)
else:
geom = parse_region_bbox(region, crs=region_crs)
# geom here should always be in 4326, and will be reprojected if crs is defined
if crs is not None:
crs = _gis_utils._parse_crs(crs, bbox=geom.total_bounds)
geom = geom.to_crs(crs)
Expand Down Expand Up @@ -246,7 +246,7 @@ def create_rotated_grid_from_geom(
)
return raster.full_from_transform(
transform,
shape=(mmax, nmax),
shape=(nmax, mmax),
nodata=1,
dtype=np.uint8,
name="mask",
Expand Down

0 comments on commit 3fb8d63

Please sign in to comment.