Skip to content

Experiment with rasterix.RasterIndex #235

@dcherian

Description

@dcherian

Hello,

A group of us (@benbovy, @scottyhq,@maxrjones, and I) have put together a new RasterIndex that allows indexing using the affine transform. It lives in this new rasterix project and is ready for experimentation. It creates lazy coordinate variables under the hood --- that is the values are generated on-demand; and supports some forms of alignment, and concatenation. For CRS handling, it composes with xproj.CRSIndex and satisfies xproj's extension API.

The code is alpha-quality --- our priority was to build something that could be experimented with, and that would guide design choices around Xarray's indexing API. Thus we've had to make some choices, not all of which are optimal and are worthy of discussion (please speak up!).

A very cool aspect is that this Index is built on a CoordinateTransformIndex class provided by Xarray, with the coordinate transform described by a CoordinateTransform class. As you can see, Xarray's goal here is to make it easy to build such indexes :).

Please try it out and let us know what you think. Our hope is that this project will provide a nice composable piece that works well with existing efforts in the space (e.g. rioxarray, odc.geo, etc).

Do you see this working well with your GeoBox abstraction (which I love)?


PS: We've vendored some code from odc.geo to handle bounding boxes for our alignment and concatenation logic. Thank you!

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