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: