Overview¶
async_geotiff.Overview
dataclass
¶
Bases: ReadMixin, FetchTileMixin, TransformMixin
An overview level of a Cloud-Optimized GeoTIFF image.
transform
property
¶
transform: Affine
The affine transform mapping pixel coordinates to geographic coordinates.
Returns:
-
Affine(Affine) –The affine transform.
fetch_tiles
async
¶
index ¶
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:
read
async
¶
Read pixel data for a window region.
This method fetches all tiles that intersect the given window and stitches them together, returning only the pixels within the window.
Parameters:
-
window(Window | None, default:None) –A Window object defining the pixel region to read. If None, the entire image is read.
Returns:
-
Array–An Array containing the pixel data for the requested window.
Raises:
-
WindowError–If the window extends outside the image bounds.
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: