out-of-core rasterization and zonal stats

Open
#129 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
data

Research direction

Start with the rasterix rasterio documentation linked in the issue and review its dask-aware wrappers for geometry_mask, rasterize, and exact_extract. Determine how xvec could use those wrappers and add a GeometryIndex, then assess the remaining exactextract reductions with flox. Done means the out-of-core path is implemented and adequately tested.

Written by the indexing model from the issue text.

Description

In rasterix I added some dask-aware wrappers for rasterio.features.geometry_mask, rasterio.features.rasterize and exact_extract (for coverage). I did this for some clients who wanted zonal stats over very large arrays.

I think it makes sense for xvec to use those wrappers under the hood, and simply add a GeometryIndex to the result.

I didn't fully wrap all of exactextract's reductions yet, but this could be done, ideally in combo with flox.

Warning: this work is lightly tested.

Dominant language
Python
Stars
139
Forks
14
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from xarray-contrib/xvec

All issues in xarray-contrib/xvec

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.