<div dir="ltr">Patrick,<div><br></div><div>After the FileFromMemBuffer() call, the content has been copied to an internal buffer.  I think the C++ API has a way of avoiding the copy (if desired) but the python does not. </div><div><br></div><div>The good thing is, no need to worry about the lifetime of the request result object.</div><div><br></div><div>Best regards,</div><div>Frank</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 23, 2015 at 12:12 PM, Patrick Young <span dir="ltr"><<a href="mailto:patrick.mckendree.young@gmail.com" target="_blank">patrick.mckendree.young@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>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.</div><div><br></div><div>My question is, when I do something like this,</div><div><br></div><div>r = requests.get(url, params=payload, timeout=timeout)<br></div><div>gdal.FileFromMemBuffer('/vsimem/temp', r.content)<br></div><div><br></div><div>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?</div><div><br></div><div>Thanks a ton!</div><span class="HOEnZb"><font color="#888888"><div>-Patrick</div><div><br></div></font></span></div>
<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">---------------------------------------+--------------------------------------<br>I set the clouds in motion - turn up   | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>light and sound - activate the windows | <a href="http://pobox.com/~warmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>and watch the world go round - Rush    | Geospatial Software Developer<br></div>
</div>