Skip to content

Add read-raster-once option for potential user-chosen speed boost #313

@SlowMo24

Description

@SlowMo24

To my understanding of the code, if a path is supplied to the gen_zonal_stats function, the rasterio.read function is called once per target-geometry. This can cause many slow read actions. In cases where all geometries are close together, a single read to a memory-array and subsequent partial reads from the array would be beneficial. Of course the library cannot decide when to use which approach as a single read may also be too big for the memory (or the data to sparse to gain real benefit).

Would you be interested in a flag like read_once that allows users to specify that they want the whole raster (clipped to the bounds of the target geoms) read into an array and then use the array approach?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions