-
Notifications
You must be signed in to change notification settings - Fork 21
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
ne_download()
doens't return filename
#98
Comments
Maybe it should simply return the full name of the file. Also need to find out the proper file extension: ext <- switch(category,
"raster" = ".tif",
".shp"
) This is assuming that all vector data is returned as shapefiles (which I think is the case). |
I think the problem is in the unzip function. When it will unzipped a new folder with the same name will be created but the path is created without. Can you change this? From Lines 25 to 30:
Should be:
At least this should work even if its ugly |
I am not sure to understand. You have an issue when loading a raster? For me it works. The issue is the last line of the function which return the filename when the data is not loaded. |
Ok, I am sorry. That was not clear enough.
Then I got this error: Error: [rast] file does not exist: .../AppData/Local/Temp/RtmpAZAqZf/MSR_50M.tif So I checked in the temp location if the file is existing. And it does, but whithin a folder named MSR_50M. I checked the |
Or in short, the argument load = True in the |
ne_download()
returns the name of the file without the extension. Reprex:Created on 2023-11-21 with reprex v2.0.2
Changing this would be a breaking change, though.
If you think it's worth changing, I would suggest returning the full path to the file so the user could do
The text was updated successfully, but these errors were encountered: