> ## Documentation Index
> Fetch the complete documentation index at: https://docs-old.tilebox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# window_from_bounds

```python theme={"system"}
def window_from_bounds(
    geotiff: GeoTIFF,
    bounds: tuple[float, float, float, float],
    *,
    crs: str | int | CRS | Proj,
    require_fully_contained: bool = False,
) -> Window
```

Convert geographic bounds to an outward-rounded GeoTIFF pixel window clipped to the image.

> [!NOTE]
>
> This function requires Python 3.11 or newer and is imported from
> `tilebox.storage.geotiff`.

## Parameters

**geotiff** `GeoTIFF`

The open async-geotiff image.

**bounds** `tuple[float, float, float, float]`

Coordinates in `(left, bottom, right, top)` order.

**crs** `str | int | CRS | Proj`

The coordinate reference system of `bounds`.

**require\_fully\_contained** `bool`

Whether to reject bounds that extend beyond the image instead of clipping
them. Defaults to `False`.

## Returns

An async-geotiff `Window` containing every pixel touched by the bounds.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.