Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply spatial mask across non-spatial dimensions #155

Open
colinahill opened this issue May 21, 2024 · 1 comment
Open

Apply spatial mask across non-spatial dimensions #155

colinahill opened this issue May 21, 2024 · 1 comment

Comments

@colinahill
Copy link

odc.geo.xr.mask fails for xarray.DataArray and xarray.Dataset if they have more than the 2 spatial dimensions of latitude and longitude (or equivalent). As other dimensions are common (e.g. time) it would be convenient to allow spatial masking across all other (non-spatial) dimensions.

This also impacts odc.geo.xr.crop, which uses mask.

@robbibt
Copy link
Contributor

robbibt commented May 30, 2024

Hye @colinahill, that seems problematic - I'm pretty sure I tested this on multi-temporal data originally. Do you have some simple reproducible example I could try this out on?

Edit: we have code below that successfully applies a mask to multitemporal data, so if this no longer works, it's broken recently. What specific error do you get here?
https://knowledge.dea.ga.gov.au/notebooks/How_to_guides/Polygon_drill.html#Mask-data-using-polygon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants