Skip to content

async_geotiff.Overview

async_geotiff.Overview dataclass

Bases: FetchTileMixin, TransformMixin

An overview level of a Cloud-Optimized GeoTIFF image.

crs property

crs: CRS

The coordinate reference system of the overview.

height property

height: int

The height of the overview in pixels.

tile_height property

tile_height: int

The height in pixels per tile of the overview.

tile_width property

tile_width: int

The width in pixels per tile of the overview.

transform property

transform: Affine

The affine transform mapping pixel coordinates to geographic coordinates.

Returns:

  • Affine ( Affine ) –

    The affine transform.

width property

width: int

The width of the overview in pixels.

fetch_tiles async

fetch_tiles(xs: list[int], ys: list[int]) -> list[Array]

Fetch multiple tiles from this overview.

Parameters:

  • xs (list[int]) –

    The x coordinates of the tiles.

  • ys (list[int]) –

    The y coordinates of the tiles.

index

index(
    x: float, y: float, op: Callable[[float], int] = floor
) -> tuple[int, int]

Get the (row, col) index of the pixel containing (x, y).

Parameters:

  • x (float) –

    x value in coordinate reference system.

  • y (float) –

    y value in coordinate reference system.

  • op (Callable[[float], int], default: floor ) –

    Function to convert fractional pixels to whole numbers (floor, ceiling, round). Defaults to math.floor.

Returns:

xy

xy(
    row: int,
    col: int,
    offset: Literal["center", "ul", "ur", "ll", "lr"] = "center",
) -> tuple[float, float]

Get the coordinates (x, y) of a pixel at (row, col).

The pixel's center is returned by default, but a corner can be returned by setting offset to one of "ul", "ur", "ll", "lr".

Parameters:

  • row (int) –

    Pixel row.

  • col (int) –

    Pixel column.

  • offset (Literal['center', 'ul', 'ur', 'll', 'lr'], default: 'center' ) –

    Determines if the returned coordinates are for the center of the pixel or for a corner.

Returns: