Skip to content

Incomplete block pixel iterator #570

@lnicola

Description

@lnicola

This bit me in #556 and probably before: it you read a block at the right or bottom edges of a band, it might be incomplete. In #556 I assumed we'd get a block of smaller dimensions, but GDAL does something different: you get a full block, but only the top-left data is valid (and the extra borders are ignored when writing).

This is hinted at in the GDAL docs:

Note that the final block may be partial ... data beyond the edge of the underlying raster band in these edge blocks is of an undetermined value.

We could offer a pixels (cells. etc.) iterator that only returns the in-bounds values, or we could go full-in on ndarray (see also #569).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions