[gdal-dev] gdal.FileFromMemBuffer

Patrick Young patrick.mckendree.young at gmail.com
Mon Feb 23 12:12:50 PST 2015


Hi all,

I've been playing around a bit with the vsimem stuff in gdal using python,
works great!  Basically, I'm getting a json response from an ArcServer
endpoint and I want to get out of the ESRI world as quick as I can.

My question is, when I do something like this,

r = requests.get(url, params=payload, timeout=timeout)
gdal.FileFromMemBuffer('/vsimem/temp', r.content)

does the buffer get copied to the created virtual file?  I know I need to
clean up with a gdal.Unlink(('/vsimem/temp'), but does something bad happen
when Python frees the r request?

Thanks a ton!
-Patrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150223/e8a7b2e8/attachment.html>


More information about the gdal-dev mailing list