[gdal-dev] Can I create a GDAL data set from bytes in memory?

Joel Odom joelodom at gmail.com
Thu Jan 29 09:01:31 EST 2009


Frank, it's working great.  Thanks for pointing these functions out.


On Wed, Jan 28, 2009 at 11:36 AM, Frank Warmerdam <warmerdam at pobox.com>wrote:

> 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,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
>
>


-- 
http://giscoder.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090129/af89db2a/attachment-0001.html


More information about the gdal-dev mailing list