rspatial / geodata

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

geodata dowloads fail with 'Couldn't connect to server' #16

Closed AMBarbosa closed 2 years ago

AMBarbosa commented 2 years ago

All geodata functions (at least all the several ones I've tried) have been giving 'Couldn't connect to server' errors since yesterday. Looks like the server is down?

soil_ph <- soil_world(var = "phh2o", depth = 5, stat = "mean", path = tempdir())
# Error in file(con, "r") : 
#   cannot open the connection to 'https://geodata.ucdavis.edu/geodata/soil/soilgrids/files.txt'
# In addition: Warning message:
# In file(con, "r") :
#   URL 'https://geodata.ucdavis.edu/geodata/soil/soilgrids/files.txt': status was 'Couldn't connect to server'

gadm(country="FRA", level=1, path=tempdir())
# Error in file(con, "r") : 
#   cannot open the connection to 'https://geodata.ucdavis.edu/gadm/gadm3.6.txt'
# In addition: Warning message:
# In file(con, "r") :
#   URL 'https://geodata.ucdavis.edu/gadm/gadm3.6.txt': status was 'Couldn't connect to server'
coconn41 commented 2 years ago

I am having the same error:

library(geodata)
#> Loading required package: terra
#> terra version 1.4.11
library(raster)
#> Loading required package: sp

tdir <- tempdir()
geodata::population(year=2015,res=.5,path=tdir)
#> Warning in utils::download.file(url = url, destfile = filename,
#> quiet = quiet, : URL 'https://biogeo.ucdavis.edu/data/geodata/pop/
#> gpw_v4_population_density_rev11_2015_30s.tif': status was 'Couldn't connect to
#> server'
#> Error in utils::download.file(url = url, destfile = filename, quiet = quiet,  : 
#>   cannot open URL 'https://biogeo.ucdavis.edu/data/geodata/pop/gpw_v4_population_density_rev11_2015_30s.tif'
#> Error in .downloadDirect(url, filepath, ...): download failed
rhijmans commented 2 years ago

Sorry, the server is down if for maintenance. Should be back up again by Tue or Wed.

rhijmans commented 2 years ago

This appears to be working again.

coconn41 commented 2 years ago

I am still having trouble downloaded data using geodata:

library(geodata)
#> Loading required package: terra
#> terra version 1.4.11
library(raster)
#> Loading required package: sp
tdir <- tempdir()
geodata::population(year=2015,res=.5,path=tdir)
#> Warning in utils::download.file(url = url, destfile = filename,
#> quiet = quiet, : URL 'https://biogeo.ucdavis.edu/data/geodata/pop/
#> gpw_v4_population_density_rev11_2015_30s.tif': status was 'Couldn't connect to
#> server'
#> Error in utils::download.file(url = url, destfile = filename, quiet = quiet,  : 
#>   cannot open URL 'https://biogeo.ucdavis.edu/data/geodata/pop/gpw_v4_population_density_rev11_2015_30s.tif'
#> Error in .downloadDirect(url, filepath, ...): download failed

Created on 2022-04-08 by the reprex package (v2.0.0)

rhijmans commented 2 years ago

That actually works for me now.

coconn41 commented 2 years ago

Strange. Perhaps @AMBarbosa could check if it is working? If so, I can open a new issue. If not, I will know it is only on my end.

rhijmans commented 2 years ago

I now see why. The CRAN version uses a different URL that is not yet working. The github version is working.

coconn41 commented 2 years ago

Thank you. I reinstalled from Github on my personal computer and the code runs.