Joel Odom wrote:
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.

Joel,

Yes, from C/C++ you can generally utilize the VSI*L facilities to wrap
a memory buffer and have it treated by GDAL as a file.  It does not work
for every image driver, but it works for most common ones.  The documentation
is available with the VSIInstallMemFileHandler() function:

  http://www.gdal.org/cpl__vsi_8h.html#66e2e6f093fd42f8a941b962d4c8a19e

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to