diff --git a/pygeoutils/pygeoutils.py b/pygeoutils/pygeoutils.py index 31f86c1..bbe5ec9 100644 --- a/pygeoutils/pygeoutils.py +++ b/pygeoutils/pygeoutils.py @@ -313,7 +313,7 @@ def _create_dataset(content: bytes, name: str) -> Union[xr.Dataset, xr.DataArray if a not in ds.attrs: ds.attrs[a] = v - ds = xarray_geomask(ds, geometry, geo_crs) + ds = xarray_geomask(ds, _geometry[0], attrs["crs"]) if len(ds.variables) - len(ds.dims) == 1: ds = ds[list(ds.keys())[0]]