Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upError when using `spatial_file_path` #75
Comments
to allow reading spatial_file_path files
|
Dear @dk-forestry, |
|
Thank you, it now works with the updated version. :) By the way, I noticed two things related to this:
Shouldn't
Maybe it would make sense to check somewhere if the shapefile exists and give a clear error if not? |
|
Both good points ! Thanks for the suggestions ! Lorenzo |
|
I was working and downloading some data with the new version from above and noticed something else related to the Assuming I have a shapefile called I imagine that this behavior is unexpected, because during scheduled data downloads or this workaround the same data would be created over and over (until the HDD is at its limits ;) ). Is there maybe a fix or workaround? |
|
Definitely a bug in the spatial_file_path option. We'll investigate it ASAP. |
Now output directory mantains the name of spatial_file_path even if this already exists
|
This was an expected behaviour: the intention was to create separate folders in case this function was run in a cycle, in which spatial files had the same basename (being placed in different folders). |
|
Thanks for the explanation and the changes to the code! :) |
I'm trying to download MODIS data using the
spatial_file_path-option. When using the shapefile manually in the GUI to "Load extent from a spatial file", everything works as expected. However, when I provide it as an argument like thisMODIStsp(gui = FALSE, options_file = "options.json", spatial_file_path = "shapefile.shp")I get the following error:
Error in as.vector(x) : no method for coercing this S4 class to a vectorWould you have any ideas what might be the problem here?