Skip to content

Commit

Permalink
Add minus sign for sy in get_affine again
Browse files Browse the repository at this point in the history
I accidentally removed the minus sign in 6ff7172
  • Loading branch information
rubencalje committed Jan 20, 2025
1 parent eb5a985 commit fb5913f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions nlmod/dims/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1612,14 +1612,14 @@ def aggregate_vector_per_cell(gdf, fields_methods, modelgrid=None):


def gdf_to_bool_da(
gdf,
ds,
ix=None,
buffer=0.0,
contains_centroid=False,
min_area_fraction=None,
**kwargs
):
gdf,
ds,
ix=None,
buffer=0.0,
contains_centroid=False,
min_area_fraction=None,
**kwargs,
):
"""Return True if grid cell is partly in polygons, False otherwise.
This function returns True for grid cells that are partly in the polygons. If
Expand All @@ -1638,7 +1638,7 @@ def gdf_to_bool_da(
ix : flopy.utils.GridIntersect, optional
If not provided it is computed from ds. Speeds up the the function
buffer : float, optional
The distance to buffer around the geometries in meters. A positive distance
The distance to buffer around the geometries in meters. A positive distance
produces a dilation, a negative distance an erosion. The default is 0.
contains_centroid : bool, optional
if True, only store intersection result if cell centroid is
Expand Down Expand Up @@ -1697,7 +1697,7 @@ def gdf_to_bool_da(
multipolygon,
contains_centroid=contains_centroid,
min_area_fraction=min_area_fraction,
**kwargs
**kwargs,
)
else:
r = ix.intersects(multipolygon)
Expand All @@ -1720,7 +1720,7 @@ def gdf_to_bool_ds(
buffer=0.0,
contains_centroid=False,
min_area_fraction=None,
**kwargs
**kwargs,
):
"""Return True if grid cell is partly in polygons, False otherwise.
Expand All @@ -1745,7 +1745,7 @@ def gdf_to_bool_ds(
ix : flopy.utils.GridIntersect, optional
If not provided it is computed from ds. Speeds up the the function
buffer : float, optional
The distance to buffer around the geometries in meters. A positive distance
The distance to buffer around the geometries in meters. A positive distance
produces a dilation, a negative distance an erosion. The default is 0.
contains_centroid : bool, optional
if True, only store intersection result if cell centroid is
Expand Down Expand Up @@ -2307,7 +2307,7 @@ def get_affine(ds, sx=None, sy=None):
if sy is None:
sy = get_delc(ds)
assert len(np.unique(sy)) == 1, "Affine-transformation needs a constant delc"
sy = sy[0]
sy = -sy[0]

if "angrot" in attrs:
xorigin = attrs["xorigin"]
Expand Down

0 comments on commit fb5913f

Please sign in to comment.