I have a raster file on a google cloud storage bucket and I want to open it with GDAL. I am trying this:
from osgeo import gdal
from google.cloud import storage
from google.cloud import client
#ensure file exists
name = '1.tif'
storage_client = storage.Client()
bucket_name = 'my-bucket'
bucket = storage_client.bucket(bucket_name)
stats = storage.Blob(bucket=bucket, name=name).exists(storage_client)
print(stats)
This returns True
and the full path is gs://my-bucket/1.tif
But when I do this
gdal.Open('gs://my-bucket/1.tif')
it returns None
I can open the file correctly just fine when I read it from my google drive, so this seems to be an issue only on google cloud storage