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

xarray source? #847

Open
banesullivan opened this issue May 3, 2022 · 3 comments
Open

xarray source? #847

banesullivan opened this issue May 3, 2022 · 3 comments

Comments

@banesullivan
Copy link
Contributor

How challenging would it be to create a new source that accepts xarray Dataset objects as input?

There is some existing work in this space here: https://github.com/davidbrochart/xarray_leaflet

@banesullivan
Copy link
Contributor Author

banesullivan commented May 3, 2022

For geospatial:

rioxarray may make this not too bad: https://corteva.github.io/rioxarray/stable/getting_started/getting_started.html

Perhaps use rioaxarray to then leverage rasterio to implement getTile()?

@manthey
Copy link
Member

manthey commented May 3, 2022

It should be quite easy. Do we have a sample dataset that can be used for testing and verification?

To make a new tile source, you need to populate a number of properties in the source class init method: sizeX, sizeY, tileWidth, tileHeight, levels. And then you need to add a getTile method. Everything else is optional.

@abkfenris
Copy link

Last week during an IOOS code-sprint (basically a hackathon), my group took a swing at image and data tiling xarray datasets among other thing.

While I didn't end up too much in the weeds of the tile implementation, though I believe that we found rioxarray was faster, but only worked on a smaller selection of datasets compared to xesmf. Limiting input to the selection of datasets that cf-xarray can parse might be useful.

Our (not fully documented) work is here: https://github.com/asascience/restful-grids

An issue on the xpublish library that might also be useful: xpublish-community/xpublish#92

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

3 participants