rspatial / geodata

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

elevation_3s() fails with "EXPIRED_CERTIFICATE" #39

Closed micha-silver closed 1 year ago

micha-silver commented 1 year ago

Trying to run the elevation_3s() fails with:

Error in utils::download.file(url = url, destfile = filename, quiet = quiet,  : 
  cannot open URL 'https://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/TIFF/srtm_44_06.zip'
download failed

When trying to access the download URL directly I get:

NET::ERR_CERT_DATE_INVALID
Subject: srtm.csi.cgiar.org
Issuer: R3
Expires on: 2 Nov 2022

Is there anyone we can contact to address this problem, and install a new certificate?

prayer007 commented 1 year ago

I have the same issue ...

micha-silver commented 1 year ago

Perhaps send an email to the contact people at Earthdata (https://srtm.csi.cgiar.org/contact-us/):

For Technical Correspondence regarding the SRTM 90m Digital Elevation Data, contact:

Andy Jarvis, Ph.D. Program Leader – Decision and Policy Analysis International Centre for Tropical Agriculture (CIAT) Email: a.jarvis@cgiar.org

For site/web related Correspondence regarding the SRTM 90m Digital Elevation Data, contact:

Sadir Mohideen CSI-CGIAR Chief GeoNetwork Technologist / Senior Web Applications Developmet Specialist Email: sadir031@gmail.com

rhijmans commented 1 year ago

Here is a work-around. You can use additional arguments method="curl" and extra="-k" to ignore the invalid certificate.

 x <- elevation_3s(4, 48, ".", method="curl", extra="-k")

I wrote to the CGIAR/CSI folks about this a while back and now again, so hopefully it will get fixed.

prayer007 commented 1 year ago

Thank you @rhijmans, thats a workaround, but the best way is it to update the SSL certificate.

prayer007 commented 1 year ago

And thank you for contacting the CGIAR/CSI folks :) And the quick response !

rhijmans commented 1 year ago

This works again.