From 74beb38f7ee14af5a3fc6c5ce645e4902eb7ef8c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 17 Dec 2023 23:05:49 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- odc/geo/_xr_interop.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/odc/geo/_xr_interop.py b/odc/geo/_xr_interop.py index 0130e0a5..606b8035 100644 --- a/odc/geo/_xr_interop.py +++ b/odc/geo/_xr_interop.py @@ -247,7 +247,7 @@ def assign_crs( def crop(xx: XrT, poly: Geometry, mask: bool = True, all_touched: bool = True) -> XrT: """ - Crops and optionally mask an xr.Dataset or xr.DataArray (``xx``) to + Crops and optionally mask an xr.Dataset or xr.DataArray (``xx``) to the spatial extent of a geometry (``poly``). :param xx: @@ -257,12 +257,12 @@ def crop(xx: XrT, poly: Geometry, mask: bool = True, all_touched: bool = True) - Geometry shape used to crop ``xx``. :param poly: - Whether to mask out pixels outside of the rasterized extent of + Whether to mask out pixels outside of the rasterized extent of ``poly``. :param all_touched: If ``True``, all pixels touched by ``poly`` will remain unmasked. - If ``False``, only pixels whose center is within the polygon or + If ``False``, only pixels whose center is within the polygon or that are selected by Bresenham's line algorithm will remain unmasked. :return: @@ -821,7 +821,7 @@ def to_rgba( vmax: Optional[float] = None, ) -> xarray.DataArray: return to_rgba(self._xx, bands=bands, vmin=vmin, vmax=vmax) - + crop = _wrap_op(crop) if have.rasterio: