-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
feature request
Hi MAP team!
If file_path
is somehow misspecified,getRaster
only fails at the end of a long slow download. Annoying for me, I suspect VV frustrating for colleagues with less good internet.
Something like stopifnot(dir.exists(file_path)
at the beginning of the function should solve this.
Related: the writeRaster(...... overwrite = FALSE)
hard coding would also lead to (unnecessary) failure after a long download if the file already existed. Checking if the target file exists before downloading would be kind - this is how geodata::gadm
operates, i.e., if files exist it just reads them in instead of re-downloading.
Metadata
Metadata
Assignees
Labels
No labels