Rafnuss / GeoPressureR

Global positioning by atmospheric pressure
https://raphaelnussbaumer.com/GeoPressureR
GNU General Public License v3.0
7 stars 1 forks source link

Error with geotiff file read on Windows #16

Closed Rafnuss closed 2 years ago

Rafnuss commented 2 years ago

Error on windows only

Error during the reading of the file. We return the uris of the gee request, the filename to the file already downloaded and the pressure_maps already computed. Here is the original error: 
error in evaluating the argument 'x' in selecting a method for function 'is.factor': Failure during raster IO

This seems to be related to an error when downloading the geotiff file with https://github.com/Rafnuss/GeoPressureR/blob/aa8716635341835342195051b254556aad157b0c/R/geopressure.R#L185

Possible error related to HTTPS connections, where download.file is known to create some issues. Not exactly sure...

See also https://github.com/Rafnuss/GeoPressureR/issues/9 for distantly issue.

Rafnuss commented 2 years ago

Fixed with #c11d51f by replacing utils::download.file with httr::GET https://github.com/Rafnuss/GeoPressureR/blob/c11d51f32810923897a46f394a8837f5c225d4a4/R/geopressure.R#L185