-
Notifications
You must be signed in to change notification settings - Fork 347
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
RioXarrayDataset for in-memory geographical xarray.DataArray objects #509
Conversation
A torchgeo.dataset based on an in-memory xarray.DataArray! Allows users to directly use a dataset they've already loaded from a GeoTIFF/NetCDF or any other processing pipeline without having to save it to a file first. Requires `rioxarray` as a dependency.
Ah cool -- I really like this, it will play really nicely with the Planetary Computer environment. Do you mind if I rebase / work on the test coverage? |
Yes, I've actually used it on Planetary Computer in fact 😁 Though I'm hoping that eventually people can just read STAC assets directly using #412.
You're welcome to create a branch and work on it independently. I'm not a big fan of rebase/force-push as it changes the commit history (and the commit signatures become invalid). Probably won't be spending any time on this PR in the near future as I'm occupied with different projects and travelling soon |
@weiji14 it seems I don't have permissions to push to your branch, can you allow that so I can rebase? |
Sounds like @weiji14 doesn't like to rebase, a merge commit may work better. I think you can create a new branch using this branch as a starting point, then open a PR on @weiji14's repo to integrate your changes (including the merge commit). I'm guessing this won't be ready in time for a 0.3.0 release about a week from now? |
There is some interest in this feature for on-disk datasets as well. Some collaborators at Schlumberger are trying to write a GeoDataset for OCO-2. OCO-2 stores all data in NetCDF files ( |
Closing this as it's probably better to start from scratch from the ground up using torch DataPipes (Composition over Inheritance) as mentioned in #576 (comment). |
I will really like this feature to come up. This will fit really well in a STAC to virtually load an entire STAC collection and then sample from it using torchgeo random sampler with ROI |
See weiji14/zen3geo#48 for example of STAC datapipes. What dataset are you working with, NetCDFs? |
A torchgeo.dataset based on an in-memory xarray.DataArray! Allows users to directly use a dataset they've already loaded from a GeoTIFF/NetCDF or any other processing pipeline without having to save it to a file first. Requires
rioxarray
as a dependency.Usage example:
produces: