-
Notifications
You must be signed in to change notification settings - Fork 85
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
ENH: Add 'compute' keyword argument to 'to_raster' #219
Conversation
Crap, I wanted this to be a draft PR. It isn't done. Can I change it? |
Codecov Report
@@ Coverage Diff @@
## master #219 +/- ##
==========================================
+ Coverage 92.11% 93.10% +0.99%
==========================================
Files 11 11
Lines 1306 1306
==========================================
+ Hits 1203 1216 +13
+ Misses 103 90 -13
Continue to review full report at Codecov.
|
Ah ok the error is due to reading not being dask friendly, right? Seems related to #214 maybe. If I do a |
That is a good question. I think it would be good to check the return. For clarity, I am thinking it would make sense to add a separate test. But, if it is a minor tweak to the existing test, then it would probably be fine to add to the parametrized test. |
That would be a nice feature. I haven't found it yet, but if I do I will let you know. But, don't worry, I won't merge it in until you give the go ahead. |
That's not good. I bet it has to do with aquiring the lock before writing. I need to test this on a bigger raster. |
I think that the implementation you have seems fine. Would you mind also updating the RasterDataset |
From the SerializableLock docstring:
I can't find an easy way to get multiprocessing lock to work. Edit: Can't figure out locket either. |
b3e05ed
to
cbe4064
Compare
@snowman2 I just merged master and forced push here. I'm noticing that none of the tests actually cover the dask writing. Is that intentional? |
@djhoese, this looks great. Thanks for fixing the tests 👍. Just a couple of tweaks to address. |
Co-authored-by: Alan D. Snow <[email protected]>
Co-authored-by: Alan D. Snow <[email protected]>
Co-authored-by: Alan D. Snow <[email protected]>
Co-authored-by: Alan D. Snow <[email protected]>
@snowman2 thanks for the review. All done now. |
@djhoese this looks great. Would you like to squash you commits or do you mind if I squash and merge? |
Feel free to squash and merge. |
Thanks @djhoese 👍 |
See #211 for additional context. The summary is that dask's
store
function allows you to passcompute=False
. Doing this returns aDelayed
object which can be computed later. This is really useful if your input dask arrays are used in other outputs (very common in the Satpy library where one input raster may be used for different RGB channels in various composites).At the time of writing this only implements the functionality and includes some docstrings. Some questions and issues I ran into that I'm looking for help on:
test_to_raster
intest_integration_rioxarray
.Distributed Issues
Example:
Ideas?
Checklist
docs/history.rst
for all changes anddocs/rioxarray.rst
for new API