-
Notifications
You must be signed in to change notification settings - Fork 7
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
Issue81 catch errors #89
Issue81 catch errors #89
Conversation
Oh I also forgot that I added a capture.output to silence the printing of extents by terra when mosaicing: f244c22#diff-685b6463d352268b0100e26e0ebfbadeebcbb739b54de14e1920ddd9dff909a9R739-R747 I can remove this if you want to keep it out of this PR but I was finding the printing for large mosaics a bit overwhelming. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Few small changes which I'm going to commit alongside this PR. Thank you so much for the help here!
"Failed to download {items$features[[which_item]]$id %||% 'UNKNOWN'} from {items$features[[which_item]]$properties$datetime %||% 'UNKNOWN'}" # nolint | ||
# stop if failure occurs when merging. | ||
if (merge) { | ||
rlang::abort( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this was a warning in the past in the hope that users would be able to resume an interrupted download, or take the successful files and run with those... but I don't know if that's actually that easy all things considered. Happy to leave as an abort and revisit in the future though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So (if I understand this correctly) the error will now only be thrown if the user is attempting to merge multiple files in this download step - for example when composite_fun = "merge" - I believe this was the main problem in #81 where gdalwarp was attempting to warp >180 input source files into a single one. In the common use case where we are using the other composite methods or composite=NULL, only one source file passes through this itertor at a time and so, the warning will be triggered as expected. Does that sound right to you? as you say happy to revisit if it causes futher issues :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thinking is that you could move forward with your downloaded 180 tiles and figure stuff out from there. Erroring here means (I think!) that no matter what you do next, you need to re-download anything that rsi did successfully grab, even if you decide to VRT your tiles or something like that. I haven't actually traced the logic thoroughly to see if that's actually what happened, though -- obviously enough I sort of lost track of things here as it was!
No porblem at all - thanks so much for merging! :) |
Fixes issues mentioned in: #81
1 - adds some extra error handling to download.R (408605f)
2 - Catch early when user provides a geometry without an extent: f244c22
Cheers, Hugh