get_window#
- get_window(ds: str | CloudPath | Path | tuple[ndarray | MaskedArray, dict] | DataArray | Dataset | DatasetReader | DatasetWriter, window: Any)[source]#
Get a window from any type of input
- Parameters:
ds (AnyRasterType) – Path to the raster, its dataset, its
xarray
or a tuple containing its array and metadatawindow (Any) – Anything that can be returned as a window. In case of iterable, assumption is made it’s geographic bounds. For pixel, please provide a Window directly.
- Returns:
Rasterio window
- Return type:
Window