I am moving a model from laptop to cloud to increase compute power and storage. Loaded an AMI with Rstudio in an ec2 instance that works like a charm, except when attempting to raster() or stack() tif files direct from a url.
download.file() works, so there isn't an outright block on access, which leads me to believe (along with some reading) that the raster package use of gdal is involved somehow.
x <- stack("http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif")
Runs perfect on a local machine, but gives the following error when run from the ec2 instance:
Error in .local(.Object, ...) :
An error occurred while creating a virtual connection to the DAP server:
Error while reading the URL: http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif.ver.
The OPeNDAP server returned the following message:
Not Found: The data source or server could not be found.
Often this means that the OPeNDAP server is missing or needs attention;
Please contact the server administrator.
Error in .rasterObjectFromFile(x, objecttype = "RasterBrick", ...) :
Cannot create a RasterLayer object from this file. (file does not exist)
Having never come across OPeNDAP, or knowing the inside out of raster, how can this be fixed?