Ah you forgot to mention that you are dealing specifically with GeoTIFFs. That changes some things, especially if you want the geospatial metadata as well.
In principle you should be able to do this directly with GDAL.jl/ArchGDAL.jl, however we still need to figure out some build issues with GDAL to have this work out of the box. However until then you may be able to still use these package, using not the provided GDAL but one seperately installed, by modifying the paths under GDAL.jl/deps/
.
Then it should work like so, to get all data to a julia array:
s3url = "/vsis3/bucket/key"
# create a dataset with all geospatial metadata (this in on the ArchGDAL#idataset branch)
dataset = ArchGDAL.read(s3url)
# read out all the pixels to an Array
A = ArchGDAL.read(dataset)
For now you can also just download the entire file and then read it in using the same code.
I’d be very interested to getting this all work as smooth as possible! But unfortunately I don’t have time right now to dive again into BinaryBuilder and ironing out the build issues. Help very much welcome!
Some references: