[R-sig-Geo] terra/GDAL error reading file from http inside docker container

Roozbeh Valavi rv@|@v| @end|ng |rom @tudent@un|me|b@edu@@u
Tue May 31 14:06:08 CEST 2022


Thanks Michael! I tried /vsicurl/ based on a previous comment of yours in
rspatial/raster issues but it didn't work.


Roozbeh Valavi
The Quantitative & Applied Ecology Group <http://qaeco.com/>
School of Ecosystem and Forest Sciences,
The University of Melbourne, VIC 3010, Australia
*Mobile*: +61 423 283 238 | *Twitter*: @ValaviRoozbeh |
*Researchgate <https://www.researchgate.net/profile/Roozbeh_Valavi>*


On Tue, May 31, 2022 at 2:20 PM Michael Sumner <mdsumner using gmail.com> wrote:

> The opendap part of the message suggests driver conflation, so you can
> disable DODS driver or try vsicurl:
>
> terra::rast("/vsicurl/
> https://s3-ap-southeast-2.amazonaws.com/silo-open-data/daily/max_temp/2018/20180103.max_temp.tif
> ")
>
> not sure it this works but possibly opts = c("if", "GTiff") or something
> like that  to trigger the "initial format" to open.
>
>
>
> On Mon, May 30, 2022 at 4:52 PM Roozbeh Valavi <
> rvalavi using student.unimelb.edu.au> wrote:
>
>> Hi all,
>>
>> I try to read raster files using a URL from within a docker container.
>> I can easily read the same file with terra package from my system (both
>> Windows and Ubuntu), but when try reading the same file within a docker
>> container it runs to an error.
>>
>> *The  R code for reading the raster file hosted on a public AWS S3
>> bucket.*
>>
>> terra::rast("
>>
>> https://s3-ap-southeast-2.amazonaws.com/silo-open-data/daily/max_temp/2018/20180103.max_temp.tif
>> ")
>>
>> *Error:*
>> Error: [rast] cannot open file:
>>
>> https://s3-ap-southeast-2.amazonaws.com/silo-open-data/daily/max_temp/2018/20180103.max_temp.tif
>> In addition: Warning message:
>> An error occurred while creating a virtual connection to the DAP
>> server:Error while reading the URL:
>>
>> https://s3-ap-southeast-2.amazonaws.com/silo-open-data/daily/max_temp/2018/20180103.max_temp.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. (GDAL error 1)
>>
>>
>> *System info of docker container:*
>> R version 4.2.0
>> GDAL 3.0.4
>> terra 1.5.21
>> DISTRIB_ID=Ubuntu
>> DISTRIB_RELEASE=20.04
>> DISTRIB_CODENAME=focal
>> DISTRIB_DESCRIPTION="Ubuntu 20.04.4 LTS"
>>
>> * libgdal-dev* is installed in the docker container.
>>
>> *System info of my local system:*
>> R version 4.2.0
>> GDAL 3.3.2
>> terra 1.5.21
>> DISTRIB_ID=Ubuntu
>> DISTRIB_RELEASE=20.04
>> DISTRIB_CODENAME=focal
>> DISTRIB_DESCRIPTION="Ubuntu 20.04.4 LTS"
>>
>> I appreciate any help.
>>
>> Kind regards,
>> Roozbeh
>>
>> Roozbeh Valavi
>> The Quantitative & Applied Ecology Group <http://qaeco.com/>
>> School of Ecosystem and Forest Sciences,
>> The University of Melbourne, VIC 3010, Australia
>> *Mobile*: +61 423 283 238 | *Twitter*: @ValaviRoozbeh |
>> *Researchgate <https://www.researchgate.net/profile/Roozbeh_Valavi>*
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo using r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>
> --
> Michael Sumner
> Software and Database Engineer
> Australian Antarctic Division
> Hobart, Australia
> e-mail: mdsumner using gmail.com
>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list