[gdal-dev] Open Python3 bytes using gdal's Python bindings

Alex Riggs alex at outsideanalytics.com
Thu Dec 10 18:06:35 PST 2020


Hello all,

First for some background. I have a service which receives protobuf
messages, each message contains a bytes-encoded netcdf file. Currently, I
write the netcdf to a temporary, on-disk file, which I then open with
gdal.Open() to do some stuff to. Based on what I could discern, both the
Open and OpenEx expect a string representing a file except in the case of
"exotic drivers".

My hope is to eliminate the need for that temporary file and instead read
the bytes string directly. Is this possible?

Thanks,

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20201210/7afb97fc/attachment.html>


More information about the gdal-dev mailing list