Frank, it's working great. Thanks for pointing these functions out.<div><br></div><div><br><br><div class="gmail_quote">On Wed, Jan 28, 2009 at 11:36 AM, Frank Warmerdam <span dir="ltr"><<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d">Joel Odom wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've got a situation where I'm trying to use GDAL to read image files contained within a KMZ archive. (My project uses both GDAL and libkml.) Libkml can easily read the image file into memory out of the KMZ archive, but I'd like to pass it to GDAL without having to write it to a temporary file on disk. I haven't figured out if this can be done yet. Thanks for any answers.<br>
</blockquote>
<br></div>
Joel,<br>
<br>
Yes, from C/C++ you can generally utilize the VSI*L facilities to wrap<br>
a memory buffer and have it treated by GDAL as a file. It does not work<br>
for every image driver, but it works for most common ones. The documentation<br>
is available with the VSIInstallMemFileHandler() function:<br>
<br>
<a href="http://www.gdal.org/cpl__vsi_8h.html#66e2e6f093fd42f8a941b962d4c8a19e" target="_blank">http://www.gdal.org/cpl__vsi_8h.html#66e2e6f093fd42f8a941b962d4c8a19e</a><br>
<br>
Best regards,<br><font color="#888888">
-- <br>
---------------------------------------+--------------------------------------<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 Programmer for Rent<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br><a href="http://giscoder.blogspot.com/">http://giscoder.blogspot.com/</a><br>
</div>