【发布时间】:2020-05-08 02:53:45
【问题描述】:
我正在处理存储在 Azure Data Lake Gen2 中的 .tif 文件。想要使用 Azure Databricks 中的 rasterio 打开此文件。
例子:
当从 Data Lake 读取图像文件时,spark.read.format("image").load(filepath) 工作正常。
但尝试打开与
with rasterio.open(filepath) as src:
print(src.profile)
出现错误:
RasterioIOError: wasbs://xxxxx.blob.core.windows.net/xxxx_2016/xxxx_2016.tif: No such file or directory
任何线索做错了什么?
更新:
按照 Axel R 的建议,在 Databricks 文件系统上挂载文件,但仍然遇到同样的问题,无法从 rasterio 打开文件,但可以读取为 df。
还尝试通过在 Datalake 中创建文件的共享访问签名并尝试通过 URI 访问文件。现在得到错误以下错误:
CURL error: error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none
为了进一步测试,尝试从网络打开一个相同的文件,即@
filepath = 'http://landsat-pds.s3.amazonaws.com/c1/L8/042/034/LC08_L1TP_042034_20170616_20170629_01_T1/LC08_L1TP_042034_20170616_20170629_01_T1_B4.TIF' 工作正常
【问题讨论】:
标签: python-3.x azure-databricks rasterio azure-data-lake-gen2