Skip to content

WIP: Array.as_xarray - #95

Closed
kylebarron wants to merge 2 commits into
mainfrom
kyle/as-xarray
Closed

kylebarron wants to merge 2 commits into
mainfrom
kyle/as-xarray

Conversation

@kylebarron

@kylebarron kylebarron commented Feb 20, 2026 •

Copy link
Copy Markdown
Member

This is just a proof of concept. Exploration for #93

Change list

  • Add Array.as_xarray method, returning a DataArray
    • Set index via rasterix
    • Set projection info via xproj
  • How do we represent nodata and mask? Depending on rioxarray is probably a non-starter, because I don't think we should be depending on rasterio.

@dcherian

Copy link
Copy Markdown

What's the difference between nodata and mask?

@kylebarron

kylebarron commented Feb 22, 2026 •

Copy link
Copy Markdown
Member Author

What's the difference between nodata and mask?

Nodata is a single value, i.e. 0 or NaN or 255 used as a sentinel value. Mask is a boolean array that has shape (height, width, 1) and has a boolean for whether each pixel is valid/invalid.

@kylebarron

Copy link
Copy Markdown
Member Author

I'm going to close this for now. I'd suggest users use something like lazycogs to manage async-geotiff -> xarray conversion. We can revisit native support in the future depending on how lazycogs progresses.

#93 (comment)

@kylebarron kylebarron closed this May 8, 2026
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

Successfully merging this pull request may close these issues.

2 participants