Reputation: 15
How can I open a file in Gdal from a Smb server without storing the file in memory?
I want to do something like this:
import smbclient
from osgeo import gdal
with smbclient.open_file(r"\\server\file.tif", username="user", password="pass", mode="rb") as f:
raster = gdal.Open(f)
I have seen some example using f.read()
, but that loads entire file into memory.
Upvotes: 1
Views: 41