From 24682f094e1e10aec3dd862fb72802cfd888795d Mon Sep 17 00:00:00 2001 From: cheginit Date: Mon, 3 Aug 2020 21:42:42 -0500 Subject: [PATCH] fix the geometry crs issue --- pygeoutils/pygeoutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]]