rspatial / geodata

download geographic data
GNU General Public License v3.0
150 stars 15 forks source link

`elevation*` and others: delete .zip file after use #12

Closed AMBarbosa closed 2 years ago

AMBarbosa commented 2 years ago

Functions that download raster maps, such as elevation* and population, download a .zip file and then save a .tif file alongside it. It seems that the .zip is not needed further, so I'd suggest adding unlink(pzip) at the end of these functions, to save users disk space.

rhijmans commented 2 years ago

Thanks, I was able to do that for elevation, worldclim and crops_monfreda. population does not download a zip. The crop_spam data is downloaded as a zip I kept it because the script does not know beforehand what the filenames in it are going to be (I could know, but it contains the data for all crops, and only a specific requested is unzipped. It may thus be more efficient this way.