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

Replace XRImage with xarray accessor #22

Open
djhoese opened this issue Jul 31, 2018 · 0 comments
Open

Replace XRImage with xarray accessor #22

djhoese opened this issue Jul 31, 2018 · 0 comments

Comments

@djhoese
Copy link
Member

djhoese commented Jul 31, 2018

Problem description

While thinking about other packages that could use this functionality I had the rather later realization that trollimage is a really good candidate for this. xarray has a recommended way of extending xarray objects: http://xarray.pydata.org/en/stable/internals.html#extending-xarray

If we convert the XRImage logic (stretch methods, saving methods, etc) in to an accessor class then you could have all of this functionality available from my_data_arr.xrimage.rio_save(...). Using this with enhancements could really help with satpy's user experience with creating their own enhancements and making things more logical.

This also mostly satisfies my feeling that XRImage should be replaced by just using xarray objects since I didn't feel it completely deserved its own package outside of satpy. Main remaining issue is that satpy users who want to add enhancements to the official satpy release either add them to satpy or to trollimage. At least that is the way it is done now. I suppose a satpy accessor could access the trollimage accessor, but then we're back at the beginning with me wondering if trollimage helps development or hurts it by being its own package.

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

1 participant