rspatial / geodata

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

Update the link to SRTM tiles #5

Closed iod-ine closed 2 years ago

iod-ine commented 2 years ago

geodata::elevation_3s() function currently points to non-existing URLs:

elev <- geodata::elevation_3s(lon = 56.42, lat = 58.07, path = ".")
#> Warning in utils::download.file(url = aurl, destfile = fn, method = "auto", :
#> cannot open URL 'https://srtm.csi.cgiar.org/SRT-ZIP/SRTM_V41/SRTM_Data_GeoTiff/
#> srtm_48_01.zip': HTTP status was '404 Not Found'
#> Warning in utils::download.file(url = aurl, destfile = fn, method = "auto", :
#> downloaded length 0 != reported length 150
#> Warning in utils::download.file(url = aurl, destfile = fn, method = "auto", :
#> cannot open URL 'http://droppr.org/srtm/v4.1/6_5x5_TIFs/srtm_48_01.zip': HTTP
#> status was '404 Not Found'
#> Warning in utils::download.file(url = aurl, destfile = fn, method = "auto", :
#> URL 'ftp://xftp.jrc.it/pub/srtmV4/tiff/srtm_48_01.zip': status was 'Couldn't
#> resolve host name'
#> Error in utils::download.file(url = aurl, destfile = fn, method = "auto", : cannot open URL 'ftp://xftp.jrc.it/pub/srtmV4/tiff/srtm_48_01.zip'

I updated the URL with what is currently working on CGIAR. The fallback URLs are also failing in the current version, but I don't know what to replace them with.

rhijmans commented 2 years ago

Thanks!!