You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The RioDataset class is defined in the module _xrimage_rasterio. The leading underscore suggests this is considered private API. In trollimage, I want to test whether a dataset is a RioDataset (for rationale, see pytroll/trollflow2#168). A way way to do that would be with isinstance(x, RioDataset), but this requires importing from a private module.
Describe the solution you'd like
I would like that RioDataset is publicly exposed.
Describe any changes to existing user workflow
N/A, I think.
Additional context
I could do type testing based on the name. This would eliminate the need to import the class. That's not very Pythonic.
I could rely on duck-typing and EAFP. Considering the potential diversity of types returned from satpys Scene.save_datasets, I'm not sure if that's a good idea.
The text was updated successfully, but these errors were encountered:
What are you doing with the instance what you've determined that it is a RioDataset?
I'd prefer not to make this public API as we home to move to rioxarray in the future which has no concept of this. I don't know enough about how rioxarray does it to know if it will need to return an object and if so what object it will return (alongside the src dask array).
Feature Request
Is your feature request related to a problem? Please describe.
The
RioDataset
class is defined in the module_xrimage_rasterio
. The leading underscore suggests this is considered private API. In trollimage, I want to test whether a dataset is aRioDataset
(for rationale, see pytroll/trollflow2#168). A way way to do that would be withisinstance(x, RioDataset)
, but this requires importing from a private module.Describe the solution you'd like
I would like that
RioDataset
is publicly exposed.Describe any changes to existing user workflow
N/A, I think.
Additional context
I could do type testing based on the name. This would eliminate the need to import the class. That's not very Pythonic.
I could rely on duck-typing and EAFP. Considering the potential diversity of types returned from satpys
Scene.save_datasets
, I'm not sure if that's a good idea.The text was updated successfully, but these errors were encountered: